Template:Legend


 * Note: a version 2.0 of this template is under construction at Template:Maplegend. Help (for IF function welcome).

██ Shows a legend row with a colored box.

{{ legend|color|label|border=border }}
 * Usage:

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.

{{legend|black|Africa}} {{legend|green|Americas}} {{legend|blue|Oceania}} {{legend|#ff0|Europe}} {{legend|#ff2800|Asia}}
 * Example:

 ██ 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.