FontColor not applied in sequence participant

0 votes
asked Sep 3 in Bug by knaifhogg (140 points)
Hi,

I've been using <<stereotypes>> to categorize color combinations, but FontColor is applied differently to BorderColor and BackgroundColor.

example:

skinparam {
    Participant {
        FontColor Black
        FontColor<<Color1>> Black
        FontColor<<Color2>> White
    }
}

box "Group 1"
    participant "Alfa" as One <<Color1>>
end box
box "Group 2"
    participant "Beta" as Two <<Color2>>
    participant "<font color = white>Omega" as Three <<Color2>>
end box

In this case, participant Beta gets Black font, but should get White. Participant Omega applies it correctly, but the solution shouldn't be needed.

I didn't write it in this section of code, but "BackgroundColor<<Color2>> LightBlue" is still applied.

Thanks.

1 Answer

0 votes
answered 5 days ago by plantuml (202,540 points)

Thanks for the report.

This may sound strange, but this issue is not that easy to fix.

Furthermore, we are currently working on a new system for skinparam (see http://plantuml.com/style-evolution )
Is this a big issue for you ? Because we are not sure whether we will fix it or not. We don't want to spend to much time on something we are going to remove.

Using the (future) new system, you should use :

http://www.plantuml.com/plantuml/uml/TOzHIiGm48RVvnH3Bo3Rvr3MAFeY2Ee5ndRiXasJcanOHVRkfesM26uWaFdpVSFCFWe5IPE5U3Hkfa0JfiYQXPxbqp9AI0oWub9q4FaziUlvrj2ue5-0c2KnlPd9oLgNewa_Zi4dDznuwmC-cF4WsYRUY3llfFnfc-4jNxDTrQf6dtZOylDVfRsWd0v6k9RoFOEw-ba9Nlq7DlTvr1btpShL6pNNzeqQf8YFZb6fCbtN0Ri1irhhxJ-wPYdwoyd_wcsbx_CZJVOR

BTW, comments on the new syntax are welcome :-)

commented 5 days ago by kjw

Would it be possible to extend to generic shapes such as box

@startuml
skinparam useBetaStyle true

<style>
sequenceDiagram {
  box {
        Client{
            BackgroundColor LightYellow
        }
        Cloud {
            BackgroundColor LightRed
        }
  }
  participant {
        BackgroundColor LightBlue
        FontColor Black
        Color1 {
          FontColor Red
        }
        Color2 {
          FontColor white
        }
  }
}
</style>

box "Tier 1"  <<Client>>
    participant "Alfa" as a <<Color1>>
end box
box "Tier 2"  <<Cloud>>
    participant "Beta" as b <<Color2>>
    participant "Theta" as c
end box
@enduml

commented 4 days ago by plantuml (202,540 points)
Thanks for the suggestion!

Your example is now working with last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's what you are expecting.
...