From Cannabis
Jump to navigation Jump to search

Sources: wikipedia:Template:Legend and commons:Template:Legend


Shows a legend row with a colored box.


color is passed to the css background property, so it can also include images. The optional border argument (e.g. 1px solid #aaa) is passed to the css border property.


██ Africa

██ Americas

██ Oceania

██ Europe

██ Asia

Getting the color codes

Here follows an example of how to get the color codes by using the freeware IrfanView. First, save the legend image(s) from the source. Open an image with Irfanview. Go to image menu/palette/ and click on "edit palette." Then from the dialog box of color squares that comes up click on the color of interest. The needed color code (value) will show up at the bottom of the dialog box after "HTML". It is the hexadecimal color code consisting of 6 characters or numbers. Copy it into the legend template.