Difference between revisions of "Template:Colour key/doc"
Jump to navigation
Jump to search
imported>Bermicourt (m) |
imported>Zyxw m (add {{TemplateData header}} (via JWB)) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> | ||
− | + | == TemplateData == | |
− | {{ | + | {{TemplateData header}} |
<templatedata> | <templatedata> | ||
{ "description": "Displaying a colour key", | { "description": "Displaying a colour key", | ||
Line 21: | Line 21: | ||
"3": | "3": | ||
{ "label": "Colour name", | { "label": "Colour name", | ||
− | "description": " | + | "description": "Name of the colour if not standard", |
"type": "string", | "type": "string", | ||
"required": false | "required": false | ||
Line 34: | Line 34: | ||
{{Colour key|Colour code|Description|Colour name}}</pre> | {{Colour key|Colour code|Description|Colour name}}</pre> | ||
− | The ''colour code'' is forwarded to the [[Cascading Style Sheets|CSS]] property <code>border-left-color</code>. | + | The ''colour code'' is forwarded to the [[Cascading Style Sheets|CSS]] property <code>border-left-color</code>. Standard (named) [[web colour]]s, such as <code>red</code>, should preferably be used to aid clarity. It is also permitted, however, to use any other valid CSS code, e.g. <code>#FF0000</code>, <code>#F00</code> or <code>rgb(100%, 0%, 0%)</code>. |
The optional parameter, "colour name" is shown as a [[tooltip]] as well as in printed and pdf views and is intended ''inter alia'' for [[Wikipedia:Manual of Style/Accessibility#Color|colour blind users]]. | The optional parameter, "colour name" is shown as a [[tooltip]] as well as in printed and pdf views and is intended ''inter alia'' for [[Wikipedia:Manual of Style/Accessibility#Color|colour blind users]]. | ||
Line 62: | Line 62: | ||
* [[Help:Using colours]] | * [[Help:Using colours]] | ||
* [[Commons:Template:legend]] | * [[Commons:Template:legend]] | ||
− | |||
<includeonly> | <includeonly> |
Latest revision as of 15:45, 5 March 2017
![]() | This is a documentation subpage for Template:Colour key. It contains usage information, categories and other content that is not part of the original template page. |
Contents
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
Displaying a colour key
Parameter | Description | Type | Status | |
---|---|---|---|---|
Colour | 1 | Colour code of the area
| String | optional |
Description | 2 | Explanation of the meaning of the colour | String | optional |
Colour name | 3 | Name of the colour if not standard | String | optional |
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}}
|
Africa
Europe
Oceania
Asia
America
|
{{Colour key}} |
|
{{Colour key|red}} |
|
{{Colour key|red|Example}} |
Example
|
{{Colour key|red|Example|Red areas}} |
Example
|
See also