Template:Color box: Difference between revisions

Updated from sandbox: synchronizes with other legend templates
( {{greater color contrast ratio}} to select default text color)
(Updated from sandbox: synchronizes with other legend templates)
Line 1:
<templatestyles src="Legend/styles.css" /><!--
<span style="background-color:{{{1|}}}; color:{{#if:{{{3|}}}|{{{3}}}|{{greater color contrast ratio|{{{1|}}}|black|white}}}}; border:1px solid {{{border|#000000}}}; text-align:center;">{{#if:{{{2|}}}|&nbsp;{{{2}}}&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;}}</span><noinclude>
--><span class="legend-color" style="<!--
{{documentation}}
-->{{#if:{{{1|}}}|{{greater color contrast ratio|{{{1}}}|black|white|css=y}}}}<!--
</noinclude>
-->{{#if:{{{3|}}}|color:{{{3}}};}}<!--
-->{{#if:{{{border|}}}|border:1px solid {{{border}}};}}<!--
-->"><!--
-->{{#if:{{{2|}}}|&nbsp;{{{2}}}&nbsp;|&nbsp;}}</span><!--
--><noinclude>{{documentation}}</noinclude>
Anonymous user