I want to color classes in my class diagram, based on a certain criteria, and then display a legend, that would look roughly like:

If I could add an HTML table within PlantUML's legend
and endlegend
, I could achieve this by changing the cell backgrounds. However, adding the HTML <table>
doesn't work. I also tried using PlantUML's salt
to insert a table, but I couldn't find any way to color the cells of the table.
Is there any way to achieve this?
Note: Question previously asked on, and copied verbatim from, StackOverflow (Link: http://stackoverflow.com/q/30999290/252576).