legend custom color

0 votes
asked Aug 7, 2021 in Bug by emalware (280 points)
I want to change the color of 1 legend, i create a style, but looks like I doesn't work

@startuml
<STYLE>
root {
backgroundcolor #AntiqueWhite-Gold
}
class {
backgroundcolor #CornflowerBlue|Wheat
}
legend {
.gra{
backgroundColor #Wheat|CornflowerBlue
}
}
</STYLE>

class A

legend<<gra>>
This some legend text
endlegend
@enduml
commented Sep 19, 2021 by The-Lu (89,080 points)

Hello E.,

A possible workaround is to use simple style for legend (without stereotype) like:

@startuml
<STYLE>
root {
  backgroundcolor #AntiqueWhite-Gold
}
class {
  backgroundcolor #CornflowerBlue|Wheat
}
legend {
  backgroundColor #Wheat|CornflowerBlue
}
</STYLE>

class A

legend
This some legend text
endlegend
@enduml

If that can help,
Regards,
Th.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...