Template:Color: Difference between revisions

From Irony Wiki
Jump to navigation Jump to search
Created page with "<span style="color:{{{1|}}}">{{{2|{{{1|}}}}}}</span>"
 
No edit summary
Line 1: Line 1:
<span style="color:{{{1|}}}">{{{2|{{{1|}}}}}}</span>
<span style="color:{{{1|}}}">{{{2|{{{1|}}}}}}</span><noinclude>{{documentation}}</noinclude>

Revision as of 09:21, 14 August 2020

Documentation

The template can be used to specify the color of a span of text. The color value can be a hex code or any other color value accepted by CSS.

Usage

{{color|COLOR|Text}}

Examples

  • {{color|#0099ff|Hello world}} outputs: Hello world
  • {{color|red|Hello world}} outputs: Hello world

If the text parameter is omitted, the color value will be displayed as the text:

  • {{color|#0099ff}} outputs: #0099ff
  • {{color|red}} outputs: red

Template data

Colors a span of text the specified color.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Color1

The color that the text should be. Can be a hex code or any other color value accepted by CSS.

Example
#0099ff
Stringrequired
Text2

The text that should be colored. If this field is not provided, the color value will be displayed as the text.

Stringsuggested