stereotype char and char background color for class diagrams

0 votes
asked Sep 25, 2022 in Bug by grivo (240 points)

@startuml
skinparam class {
    BackgroundColor PaleGreen
    ArrowColor SeaGreen
    BorderColor SpringGreen

    BackgroundColor<<metaclass>> Wheat
    BorderColor<<metaclass>> Tomato
    ArrowColor<<metaclass>> Red
}

skinparam stereotypeCBackgroundColor Red
skinparam stereotypeCBackgroundColor<<metaclass>> DimGray
skinparam spotChar Z
skinparam spotChar<<metaclass>> M

class meta <<metaclass>>
class mcls <<metaclass>>
meta "1" *-- "many" Class02 : contains
mcls o-- Class04 : aggregation
@enduml

link here

questions

  1. skinparam spotChar<<metaclass>> M - it works, however, no official documentation found on this skinparam, can i see details on this anywhere but at forum?
  2. skinparam spotChar Z - why this param isn't applied on simple class? how can it be done?
  3. not skinparam stereotypeCBackgroundColor Red neither skinparam stereotypeCBackgroundColor<<metaclass>> DimGray works but it should according official guide, what have i done wrong here?
commented Sep 26, 2022 by grivo (240 points)

i have read this thread listedm however skinparam stereotypeCBackgroundColor Red does not work despite it should

couldn't someone post an example how to get stereotypeCBackgroundColor  working?

1 Answer

0 votes
answered Sep 26, 2022 by The-Lu (63,920 points)

Hello G, and all,

Here is an attempt by style:

@startuml
<style>
spotClass {
  BackgroundColor red
}

.metaclass {
  spotClass {
    BackgroundColor DimGray
  }
}
</style>

skinparam class {
    BackgroundColor PaleGreen
    ArrowColor SeaGreen
    BorderColor SpringGreen

    BackgroundColor<<metaclass>> Wheat
    BorderColor<<metaclass>> Tomato
    ArrowColor<<metaclass>> Red
}

'skinparam stereotypeCBackgroundColor Red
'skinparam stereotypeCBackgroundColor<<metaclass>> DimGray
skinparam spotChar Z
skinparam spotChar<<metaclass>> M

class meta <<metaclass>>
class mcls <<metaclass>>
meta "1" *-- "many" Class02 : contains
mcls o-- Class04 : aggregation
@enduml

But that is not conclusive.

@PlantUML: for improvement....

If that can help,
Regards.

commented Sep 27, 2022 by grivo (240 points)
so as i see, despite you have tried to mark title chars of metaclasses by gray - you haven't succeeded as well as me

so, finally, it may be treated as a bug since example's compilation result conflicts with official documntation
commented Sep 28, 2022 by The-Lu (63,920 points)
Yes, there are some issues.

Then awaiting @PlantUML team for their correction.

Thanks a lot.
commented Oct 18, 2022 by grivo (240 points)
should some bug issue to be raised at github, i suppose?
...