BackgroundColor and BorderColor skin params don't work when ComponentSyle is set to rectangle.

0 votes
asked Mar 10, 2021 in Bug by nwaters (180 points)

I'm using Plant UML 1.2021.1

skinparam component {
    style rectangle
    BorderColor Orange
    BackgroundColor Red
    BackgroundColor<<static lib>> Blue
    BackgroundColor<<daemon>> Green
}
[R]
[B] <<static lib>>
[G] <<daemon>>

This produces the following:

If I comment out the style attribute the output is:

1 Answer

+1 vote
answered Mar 10, 2021 by The-Lu (48,920 points)
 
Best answer

Hello N.,

Because when a component becomes a rectangle...  it is necessary to change rectangle skinparam! wink

Here is a workaround:

@startuml
skinparam component {
    style rectangle
}
skinparam rectangle {
    BorderColor Orange
    BackgroundColor Red
    BackgroundColor<<static lib>> Blue
    BackgroundColor<<daemon>> Green
}
[R]
[B] <<static lib>>
[G] <<daemon>>
@enduml

If that can help,
Regards,
Th.

...