Template:TextColors/doc
From FORwiki
(→Standard color names) |
(→See also) |
||
(2 intermediate revisions not shown) | |||
Line 3: | Line 3: | ||
'''<nowiki> {| style="background:{{{2}}};" | <span style="color: {{{1}}}">{{{3}}}</span> |} </nowiki>''' | '''<nowiki> {| style="background:{{{2}}};" | <span style="color: {{{1}}}">{{{3}}}</span> |} </nowiki>''' | ||
- | Sets foreground and background | + | 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: | 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 | *a poor contrast may make the text difficult or impossible to read | ||
- | *the contrast can be experienced as even poorer in the case of | + | *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 | *links have a color according to user settings; they become invisible if this color is equal to the background color | ||
== Examples == | == Examples == | ||
- | <nowiki>{{co|#ffffff|#000000|From | + | <nowiki>{{co|#ffffff|#000000|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|#ffffff|#000000|From FORwiki, the romanian foresight website.}} |
- | <nowiki>{{co|#aa0000|#009999|From | + | <nowiki>{{co|#aa0000|#009999|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|#aa0000|#009999|From FORwiki, the romanian foresight website.}} |
- | <nowiki>{{co|white|black|From | + | <nowiki>{{co|white|black|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|white|black|From FORwiki, the romanian foresight website.}} |
- | <nowiki>{{co|yellow|grey|From | + | <nowiki>{{co|yellow|grey|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|yellow|grey|From FORwiki, the romanian foresight website.}} |
- | <nowiki>{{co|blue|silver|From | + | <nowiki>{{co|blue|silver|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|blue|silver|From FORwiki, the romanian foresight website.}} |
- | <nowiki>{{co|grey|yellow|From | + | <nowiki>{{co|grey|yellow|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|grey|yellow|From FORwiki, the romanian foresight website.}} |
- | <nowiki>{{co|black|aqua|From | + | <nowiki>{{co|black|aqua|From FORwiki, the romanian foresight website.}}</nowiki> gives: {{co|black|aqua|From FORwiki, the romanian foresight website.}} |
== Standard color names == | == Standard color names == | ||
Line 79: | Line 79: | ||
== See also == | == See also == | ||
- | |||
* {{tl|Colors}} – background/text color (text in free span) | * {{tl|Colors}} – background/text color (text in free span) | ||
* {{tl|TextColors}} – background/text color (text in block table) | * {{tl|TextColors}} – background/text color (text in block table) |
Current revision as of 17:54, 24 December 2009
Contents |
Usage
Guts: {| 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
{{co|#ffffff|#000000|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
{{co|#aa0000|#009999|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
{{co|white|black|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
{{co|yellow|grey|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
{{co|blue|silver|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
{{co|grey|yellow|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
{{co|black|aqua|From FORwiki, the romanian foresight website.}} gives:
From FORwiki, the romanian foresight website. |
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
- {{Colors}} – background/text color (text in free span)
- {{TextColors}} – background/text color (text in block table)
- {{NestTextColors}} – background/text color (text in block div)
- {{bkg}} – background color (text in free span)
- {{bg}} – background color (text in free span)