How to change just the label background color in a class diagram.

0 votes
asked Sep 16, 2016 in To be sorted by rskueffner (180 points)
Given the following puml, how may I alter the background color of the label box and not the whole class?
!define MONOSPACE #EBEFF4
!define DARK #205081
 
SkinParam Shadowing False
 
SkinParam Class {
ArrowColor DARK
BorderColor DARK
BackgroundColor MONOSPACE
FontSize 16
FontStyle Bold
FontColor DARK
AttributeFontColor BLACK
}
 
Class Foo {
-Member
+Method()
}

1 Answer

+1 vote
answered Sep 16, 2016 by plantuml (175,840 points)
selected Sep 19, 2016 by rskueffner
 
Best answer

There is a not very documented ClassHeaderBackgroundColor.

Example:

@startuml
!define MONOSPACE #EBEFF4
!define DARK #205081

SkinParam Shadowing False

SkinParam Class {
    HeaderBackgroundColor blue
    ArrowColor DARK
    BorderColor DARK
    BackgroundColor MONOSPACE
    FontSize 16
    FontStyle Bold
    FontColor DARK
AttributeFontColor BLACK
}

Class Foo {
    -Member
    +Method()
}
@enduml

http://plantuml.com/plantuml/uml/NOxTQW8n44QlCqynuarB4RIqnTjatL2mMwNx15aprM3Cm6mMgUAxjxBIMY-_yytF6NZw38cmMhmlwgKkIXoMfhJs2GQNPgO_vZXy73-FfnE0UXlIqedRORrndlSXhT6wsD9rLKJNjdW4zKhEanYtsgw5k-GBZYpOn8v0QH7Uz-3y0fHX-Hd-HsuMVoL1MKwv3WV2oSibvAz8Q3ZwFb_TqJbBQBfCVzoywM8E9u1UrJAVTKSLxHeIK0yLvGtxktiuVGC0

...