Class diagram theming: taming the default colors
Default class diagrams are too loud for company docs. Here’s how to tune
skinparamfor a calmer look.
The default theme problem
The out-of-the-box class theme uses saturated fills and heavy borders. Fine on white, but too loud in slides or on dark documentation sites.
1 | @startuml |
A calm skinparam set
Drop these right after @startuml to override the defaults:
1 | @startuml |
Key bits:
BackgroundColor #FAFAFA— off-white, softer than pure white.BorderColor #2F4858— dark blue-gray; all lines use it.HeaderBackgroundColor #E8EEF4— header row tinted.classAttributeIconSize 0— drops the tiny lock icon.hide circle— removes the extra circles on inheritance arrows (UML2 doesn’t draw them).
Dark-background variant
If your docs site is dark, swap the palette:
1 | @startuml |
Share via a theme file
If most of your diagrams use the same palette, move the skinparams into themes/puml-theme.puml and !include it:
1 | !include themes/puml-theme.puml |
Vendor the theme file in CI — no network fetch.
Debug workflow
Draw a 2-class empty diagram first; flip skinparam values one at a time until it looks right. Then build the real diagram.
- Title: Class diagram theming: taming the default colors
- Author: puml.online
- Created at : 2026-07-29 14:05:00
- Updated at : 2026-08-14 21:34:29
- Link: https://puml.online/blog/plantuml-theming-en/
- License: This work is licensed under CC BY-NC-SA 4.0.