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:

2 Answers

+1 vote
answered Mar 10, 2021 by The-Lu (70,400 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.

0 votes
answered Sep 29 by The-Lu (70,400 points)

FYI it is now fixed, and the workaround does not works. :-)

See result with version V1.2024.6:

Enjoy,
Regards,
Th.

...