Template:Colors
Missing text string
This template was copied from Template:Colors on Wikia Templates. That wiki should periodically be checked for a new version of this template. |
- Description
- Sets background and text colors of a given text. They can be specified by name or in the format
#dddddd
(RGB hex triplet) or simplified#ddd
.
- Syntax
{{Colors|<text color>|<background color>|<text>}}
- Code
Guts:
<span style="background: {{{2|}}}; color: {{{1|}}}">{{{3|}}}</span>
- Standard color names
The HTML 4.01 specification (for details see Wikipedia:HTML) defines sixteen named colors, as follows:
Color | Hexadecimal | Color | Hexadecimal |
---|---|---|---|
black | #000000 | silver | #c0c0c0 |
gray | #808080 | white | #ffffff |
maroon | #800000 | red | #ff0000 |
purple | #800080 | fuchsia | #ff00ff |
green | #008000 | lime | #00ff00 |
olive | #808000 | yellow | #ffff00 |
navy | #000080 | blue | #0000ff |
teal | #008080 | aqua | #00ffff |
- Notes
Unless in the case of personal use on a user page, use this template with great caution:
- a poor contrast may make the text difficult or impossible to read
- the contrast can be experienced as even poorer in the case of colour blindnes
- links have a color according to user settings; they become invisible if this color is equal to the background color.
- Sample output
{{colors|#ffffff|#000000|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
{{colors|#aa0000|#009999|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
{{colors|white|black|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
{{colors|yellow|grey|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
{{colors|blue|silver|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
{{colors|grey|yellow|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
{{colors|black|aqua|From [[wikipedia:|Wikipedia]], the free [[wikipedia:encyclopedia|]].}} gives: From Wikipedia, the free encyclopedia.
- See also
- {{Fontcolor}} – background/text color or change text color only if only 2 parameters (text in free span)
- Wikipedia:web colors
- non-dithering safe colors
Done making changes? Refresh this text! (Why?)