Template:Color box: Difference between revisions
From Roses, Tulips, & Liberty
Content added Content deleted
(Add a swatch example.) |
m (30 revisions imported from wikipedia:Template:Color_box) |
||
(21 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
<templatestyles src="Legend/styles.css" /><span class="legend-color" style="{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|black|white|css=y}} |
|||
<noinclude>{{merge|Colorsample|Template talk:Colorsample#Merge proposal}}</noinclude><span style="background-color:{{{1}}}; color:{{{3}}}; border:1px solid #000000; text-align:center;">{{#if:{{{2|}}}| {{{2}}} | }}</span><noinclude> |
|||
}}{{#if:{{{3|}}}|color:{{{3}}}; |
|||
}}{{#if:{{{border|}}}|border:1px solid {{{border}}}; |
|||
'''Syntax:''' |
|||
}}{{#if:{{{padding|}}}|padding:{{{padding}}};}}">{{#if:{{{2|}}} |
|||
''<nowiki>{{color box|color|text|text color}}</nowiki>'' |
|||
|{{#if:{{{padding|}}}|{{{2}}}| {{{2}}} }} |
|||
| }}</span><noinclude> |
|||
'''Examples:''' |
|||
⚫ | |||
* ''<nowiki>{{color box|red|This is some blue text in a red box|blue}}</nowiki>'': {{color box|red|This is some blue text|blue}} |
|||
* ''<nowiki>{{color box|green}}</nowiki>'': {{color box|green}} |
|||
⚫ |