Template:LegendItem/doc

The LegendItem template adds a row with a colored box and labels to act as a legend on a color coded map.

Source editor
When using the source editor, put LegendItem in the a line to apply the template. The template requires two numbered parameters that can be passed anonymously. The first parameter specifies the color of the box, the second specifies the text next to the box.

Visual editor
When using the visual editor, select "insert" which opens a list of options right below the "insert" button. Select "template" from the options, which will open the "insert a template" window. Select the search bar, type "LegendItem" and press "add". This will open the "Insert:LegendItem" window. Select "color" and insert the name, hex or rgb value of color for the box. Under "caption", set the caption text.