Template:Colour key
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Colour key
<templatedata> { "description": "Displaying a colour key",
"params": { "1":
{ "label": "Colour",
"description": "Colour code of the area",
"type": "string",
"required": false,
"default": "black"
},
"2":
{ "label": "Description",
"description": "Explanation of the meaning of the colour",
"type": "string",
"required": false
},
"3":
{ "label": "Colour name",
"description": "Name of the colour if not standard",
"type": "string",
"required": false
}
}
} </templatedata>
Usage
{{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
| Entry | Result |
|---|---|
{{Colour key|black|Africa}}
|
|
{{Colour key}} |
|
{{Colour key|red}} |
|
{{Colour key|red|Example}} |
|
{{Colour key|red|Example|Red areas}} |
See also
| The above documentation is transcluded from Template:Colour key/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |