Template:Colored text: Difference between revisions
From Space Station 14 Wiki
(Created page with "<includeonly>{{#vardefine: colored_text_color |{{#switch: {{lc: {{{1}}}}} |{{{1}}} }} }}<!-- --><span style="color: {{#var:colored_text_color}};">{{{2}}}</span></includeonly><noinclude> {{documentation}} <templatedata> { "params": { "1": { "label": "Color", "description": "A CSS-compatible color or a color code.", "type": "line", "suggestedvalues": [ "black", "silver", "gray", "white", "maroon", "red", "purple", "fuchsia"...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{# | <includeonly>{{#iferror: {{{1}}} | ||
|{{error|given color is an error: {{{1}}}}} | |||
|{{{1}}} | |<span style="color: {{{1}}};">{{{2}}}</span> | ||
}} | }}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
Line 184: | Line 181: | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Latest revision as of 15:36, 9 August 2024
Colors
Red text using one of the predefined CSS colors: red
{{Colored text|red|hello world, I'm red}}
This text hello world, I'm red has a custom color.
Gold text using hex code for gold: #ffd700
{{Colored text|#ffd700|GOLD GOLD GOLD}}
This text GOLD GOLD GOLD has a custom color.
Orange text using HSL: hsl(24, 100%, 50%)
{{Colored text|hsl(24, 100%, 50%)|orange energy}}
This text orange energy has a custom color.
See also
- {{Color}} - for quickly selecting in-game and wiki colors. Useful in bundle with this template.
An easy way to give a color to a text.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Color | 1 | A CSS-compatible color or a color code.
| Line | required |
Text | 2 | A text to color. | Line | required |