Class diagram theming: taming the default colors

puml.online

Default class diagrams are too loud for company docs. Here’s how to tune skinparam for 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
2
3
4
5
6
7
@startuml
class Animal
class Dog
class Cat
Animal <|-- Dog
Animal <|-- Cat
@enduml

A calm skinparam set

Drop these right after @startuml to override the defaults:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@startuml
skinparam class {
BackgroundColor #FAFAFA
BorderColor #2F4858
ArrowColor #2F4858
FontColor #1F2328
HeaderBackgroundColor #E8EEF4
}
skinparam stereotypeCBackgroundColor #FAFAFA
skinparam stereotypeABackgroundColor #FAFAFA
skinparam classAttributeIconSize 0
hide circle

class Animal {
+name: String
+age: int
+makeSound()
}
class Dog {
+breed: String
+bark()
}
class Cat {
+indoor: boolean
+meow()
}
Animal <|-- Dog
Animal <|-- Cat
@enduml

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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
@startuml
skinparam class {
BackgroundColor #161B22
BorderColor #58A6FF
ArrowColor #58A6FF
FontColor #E6EDF3
HeaderBackgroundColor #21262D
}
skinparam stereotypeCBackgroundColor #161B22
skinparam stereotypeABackgroundColor #161B22
hide circle

class Animal {
+name: String
+age: int
}
class Dog
class Cat
Animal <|-- Dog
Animal <|-- Cat
@enduml

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
2
3
4
5
6
!include themes/puml-theme.puml
@startuml
class Animal
class Dog
Animal <|-- Dog
@enduml

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.