Template:Color label: Difference between revisions

From Space Station 14 Wiki
(Created page with "<includeonly><span> <span style="background-color: {{{1}}};"></span> <span>{{{2}}}</span> </span></includeonly><noinclude> {{docs}} <templatedata> { "params": { "1": { "label": "Color", "description": "A valid CSS color.", "example": "red", "type": "line", "required": true }, "2": { "label": "Label", "description": "A label.", "example": "Cool green", "type": "line", "required": true } }, "description": "Produces a little square...")
 
No edit summary
Line 1: Line 1:
<includeonly><span>
<includeonly><!--
<span style="background-color: {{{1}}};"></span>
--><templatestyles src="Color label/styles.css" /><!--
<span>{{{2}}}</span>
 
--><span class="color-label">
<span class="color-label-label" style="background-color: {{{2}}};"></span>
<span class="color-label-color-square" style="background-color: {{{1}}};"></span>
<span class="color-label-code">{{{1}}}</span>
</span></includeonly><noinclude>
</span></includeonly><noinclude>
{{docs}}
{{docs|bb=
{{uses template styles}}
}}
 
{{color label|blue|hello world}}


<templatedata>
<templatedata>
Line 17: Line 25:
"2": {
"2": {
"label": "Label",
"label": "Label",
"description": "A label.",
"description": "A custom label.",
"example": "Cool green",
"example": "Cool green",
"type": "line",
"type": "line",
"required": true
"suggested": true
}
}
},
},
"description": "Produces a little square with given color and a label.",
"description": "Produces a little square with given color and a color code label. Can also add a custom label.",
"paramOrder": [
"paramOrder": [
"1",
"1",

Revision as of 14:40, 9 August 2024

Template documentation
view or edit this documentation about template documentation
Uses template styles
This template uses template styles found in:

Examples

Hex color (gold): Page Template:Color label/styles.css has no content. #FFD700

Predefined color (red): Page Template:Color label/styles.css has no content. red

RGB color (orange) with a custom name: Page Template:Color label/styles.css has no content. #FFD700

Page Template:Color label/styles.css has no content. blue

Produces a little square with given color and a color code label. Can also add a custom label.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Color1

A valid CSS color.

Example
red
Linerequired
Label2

A custom label.

Example
Cool green
Linesuggested