Template:TextColors
{{{3}}} |
Usage
editGuts: {| style="background:{{{2}}};" | <span style="color: {{{1}}}">{{{3}}}</span> |}
Sets foreground and background colors of a given text. They can be specified by name or in the format #dddddd (RGB hex triplet).
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 color blindness
- links have a color according to user settings; they become invisible if this color is equal to the background color
Examples
edit{{co|#ffffff|#000000|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
{{co|#aa0000|#009999|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
{{co|white|black|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
{{co|yellow|grey|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
{{co|blue|silver|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
{{co|grey|yellow|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
{{co|black|aqua|From [[Wikiversity]], the free [[encyclopedia]].}} gives:
From Wikiversity, the free encyclopedia. |
Standard color names
editThe HTML 4.01 specification 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 |
See also
editSimilar templates at English sister projects [edit] | |||
---|---|---|---|
wpd | Wikipedia | TextColors | |
cms | Commons | TextColors | |
wbk | Wikibooks | TextColors | |
wsp | Wikispecies | TextColors | |
wvy | Wikiversity | TextColors |
- {{Colors}} – background/text color (text in free span)
- {{TextColors}} – background/text color (text in block table)
- {{bkg}} – background color (text in free span)
- {{bg}} – background color (text in free span)
- {{Fontcolor}}
- web colors
- non-dithering safe colors