Template:Color: Difference between revisions
Template page
More actions
why only work for white and not #fff or anything else? |
m expl |
||
| Line 1: | Line 1: | ||
<span style="background:{{{bg|transparent}}};color:{{{1}}}">{{{2}}}</span><noinclude> | <span style="background:{{{bg|transparent}}};color:{{{1}}}">{{{2}}}</span><noinclude> | ||
---- | ---- | ||
'''Usage:''' <nowiki>{{</nowiki>color|''color''|''text''}} | '''Usage:''' <nowiki>{{</nowiki>color|''color''|''text''}}   <small>both param values mandatory</small> | ||
'''Examples:''' | '''Examples:''' | ||
| Line 8: | Line 8: | ||
* <nowiki>{{</nowiki>color|white|bg=black|example text}} → {{color|white|bg=black|example text}} | * <nowiki>{{</nowiki>color|white|bg=black|example text}} → {{color|white|bg=black|example text}} | ||
For colors see | |||
To draw just a color box with ''bg''-color use it like | |||
* <nowiki>{{</nowiki>color|red|<nowiki>{{</nowiki>0|00}}|bg=#0A0}} → {{color|red|{{0|00}}|bg=#0a0}}   or   <nowiki>{{</nowiki>color|#F0F|XX|bg=#F0F}} → {{color|#F0F|bg=#F0F|XX}} | |||
For colors see: {{W|Web colors}}. | |||
Revision as of 10:55, 3 February 2012
{{{2}}}
Usage: {{color|color|text}} both param values mandatory
Examples:
- {{color|red|example text}} → example text
- {{color|#0000FF|example text}} → example text
- {{color|white|bg=black|example text}} → example text
To draw just a color box with bg-color use it like
- {{color|red|{{0|00}}|bg=#0A0}} → or {{color|#F0F|XX|bg=#F0F}} → XX
For colors see: Web colors.
af:Sjabloon:Kleur
en:Template:Color
fr:Modèle:Coloré
ja:Template:Color
sl:Predloga:Barva
zh-yue:Template:Color