How to generate a legend with colors in PlantUML?

I’ve tried nfec’s solution and it was not working for me, but it started me off on a solution that did work. Here is what I got:

legend right
    |Color| Type |
    |<#FF0000>| Type A class|
    |<#00FF00>| Type B class|
    |<#0000FF>| Type C class|
endlegend

This is how it looks like:

Legend color table

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)