Template:Color/doc
< Template:Color
Jump to navigation
Jump to search
Revision as of 18:38, 8 March 2013 by imported>Wikid77 (expanded description; aligned examples)
| This is a documentation subpage for Template:Color. It contains usage information, categories and other content that is not part of the original template page. |
The quick Template:Color can be used to add a span of text with any given color, such as an RBG hex code, #C9E72A, or any of the web colors: red, blue, green, mocassin, or darkorchid, etc. The foreground text color is set, but to reset the background color, see: {{bg}}.
Usage
{{color|name of color or hex code of color|Text}}
For example:
{{color|red|Hello, world!}} Template:Nsgives: Hello, world!
{{color|#00F000|Hello, world!}}Template:Nsgives: Hello, world!
Wikitext generated:
<span style="color:{{{1|}}}">{{{2|}}}</span>
See Web colors for a list of colors.
Performance considerations
The template merely uses a span tag: <span style="color:{{{1}}}">{{{2}}}</span>. It runs at speeds in excess of 700 per second, and so it is functionally identical to the longer span-tag markup.
See also
- {{Background color}}
- {{Resize}}
- {{LinkColor}}