Template:Colour key/doc

From Simple English Wikipedia, the free encyclopedia

TemplateData[change source]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Colour key in articles based on its TemplateData.

TemplateData for Colour key

Displaying a colour key

Template parameters

ParameterDescriptionTypeStatus
Colour1

Colour code of the area

Default
black
Stringoptional
Description2

Explanation of the meaning of the colour

Stringoptional
Colour name3

Name of the colour if not standard

Stringoptional

Usage[change source]

{{Colour key|Colour code|Description}}
{{Colour key|Colour code|Description|Colour name}}

The colour code is forwarded to the CSS property border-left-color. Standard (named) web colours, such as red, should preferably be used to aid clarity. It is also permitted, however, to use any other valid CSS code, e.g. #FF0000, #F00 or rgb(100%, 0%, 0%).

The optional parameter, "colour name" is shown as a tooltip as well as in printed and pdf views and is intended inter alia for colour blind users.

Examples[change source]

Entry Result
{{Colour key|black|Africa}}
{{Colour key|green|Europe}}
{{Colour key|blue|Oceania}}
{{Colour key|#ff0|Asia}}
{{Colour key|#ff2800|America}}
  • Africa
  • Europe
  • Oceania
  • Asia
  • America
  • {{Colour key}}
  • 
  • {{Colour key|red}}
  • 
  • {{Colour key|red|Example}}
  • Example
  • {{Colour key|red|Example|Red areas}}
  • Example
  • See also[change source]