Template:Text
Usage
Guts: <span style="background:{{{bg}}}; color:{{{c}}}; font:{{{f}}}; text-decoration:{{{d}}};">{{{1}}}</span>
Sets foreground and background colors of a given text. They can be specified by name or in the format #dddddd; (RGB hex triplet).
- bg= background color (defaults to #ffffff or white).
- c= text color (defaults to #000000 or black).
- f= font (no default).
- d= none, overline, line-through, underline, or blink (defaults to none).
- none removes all decorations.
- blink is not sported (does not work) in IE, Chrome, or Safari.
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.
See also
- wikipedia:Template:Colors – background/text color (text in free span) -- the inspiration for this template.
- wikipedia:Template:TextColors – background/text color (text in block table)
- wikipedia:Template:NestTextColors – background/text color (text in block div)
- wikipedia:Template:bkg – background color (text in free span)
- wikipedia:Template:bg – background color (text in free span)
Examples
{{text|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=#ffffff|c=#000000|f=bold italic 16px serif|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=#aa0000|c=#009999|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=white|c=black|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=yellow|c=grey|d=overline|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=blue|c=silver|d=line-through|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=grey|c=yellow|d=underline|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
{{text|bg=black|c=aqua|d=blink|From [[Wikipedia]], the free [[encyclopedia]].}} gives: From Wikipedia, the free encyclopedia.
- You can not see the blinking if you are using IE, Chrome, or Safari.
Standard color names
The 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
Done making changes? Refresh this text! (Why?)