FANDOM


Description
Sets background and text colors of a given text. They can be specified by any valid CSS color specification like name, in the format #hhhhhh (RGB hex triplet, where h is 0-f) or simplified #hhh, or hsl(0-360,0-100%,0-100%) / hsla(0-360,0-100%,0-100%,0-1), or rgb(0-255,0-255,0-255) / rgba(0-255,0-255,0-255, 0-1).
Syntax
{{Colors|text color|background color|text}}
Code
<span style="background: {{{2|}}}; color: {{{1|}}};">{{{3|}}}</span>
Standard color names
The HTML 4.01 specification (see web colors on Wikipedia) 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 color blindness
  • 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 [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
{{colors|#aa0000|#009999|From [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
{{colors|white|black|From [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
{{colors|yellow|grey|From [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
{{colors|blue|silver|From [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
{{colors|grey|yellow|From [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
{{colors|black|aqua|From [[w:c:templates|Templates Wiki]]}} gives...
From Templates Wiki
See also
{{Fontcolor}} – change text and background colors like this template
{{TextColor}} – change text color
Web colors
Non-dithering safe colors
Community content is available under CC-BY-SA unless otherwise noted.