Template:Color label: Difference between revisions

From Space Station 14 Wiki
No edit summary
No edit summary
Line 11: Line 11:
">
">
<span class="color-label-label" style="
<span class="color-label-label" style="
    background-color: {{{2}}};
     /* offset from the color rect */
     /* offset from the color rect */
     margin-right: 0.3rem;
     margin-right: 0.3rem;
"></span>
">{{{2}}}</span>
<span class="color-label-color-square" style="
<span class="color-label-color-square" style="
     background-color: {{{1}}};
     background-color: {{{1}}};
Line 31: Line 30:
{{uses template styles}}
{{uses template styles}}
}}
}}
{{color label|blue|hello world}}


<templatedata>
<templatedata>

Revision as of 14:42, 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): {{{2}}} #FFD700

Predefined color (red): {{{2}}} red

RGB color (orange) with a custom name: Sunset #FFD700

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