Difference between revisions of "Template:Colort/ColorShort"
Jump to navigation
Jump to search
imported>Jak123 m |
imported>Andux (+ color conversion, like Template:Colort/Color) |
||
| Line 1: | Line 1: | ||
<div style="float:left;display:inline;font-size:90%;margin:1px 5px 1px 5px;width:11em; height:6em;text-align:center;padding:auto;"> | <div style="float:left;display:inline;font-size:90%;margin:1px 5px 1px 5px;width:11em; height:6em;text-align:center;padding:auto;"> | ||
| − | <p title="hsv({{{h}}}°,{{{s}}}%,{{{v}}}%); rgb({{{r}}},{{{g}}},{{{b}}}); #{{{hex}}}" | + | <p title="hsv({{#ifeq:{{{h}}}|—|—|{{{h|{{#expr:{{RGBtoHSL.H|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}°}},{{{s|{{#expr:100*{{RGBtoHSV.S|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}%,{{{v|{{#expr:100*{{RGBtoHSV.V|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}%); rgb({{{r|0}}},{{{g|0}}},{{{b|0}}}); #{{{hex|{{hex3|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|#=}} }}}" |
style="width:10em;height:1em; | style="width:10em;height:1em; | ||
padding:5px;margin:auto; | padding:5px;margin:auto; | ||
| − | background-color: | + | background-color:rgb({{{r|0}}},{{{g|0}}},{{{b|0}}}); |
border: solid 1px #ccc;text-align:right;"> | border: solid 1px #ccc;text-align:right;"> | ||
<span title="Web-safe" style="font-weight:bold; font-size:100%; color:#f00;">{{#ifeq:{{{web_safe|}}}|Yes|<span class="Unicode">✓</span>| }}</span> | <span title="Web-safe" style="font-weight:bold; font-size:100%; color:#f00;">{{#ifeq:{{{web_safe|}}}|Yes|<span class="Unicode">✓</span>| }}</span> | ||
| Line 9: | Line 9: | ||
<p style="width:9em;padding:5px;margin:auto;">{{{name}}}</p> | <p style="width:9em;padding:5px;margin:auto;">{{{name}}}</p> | ||
</div> | </div> | ||
| + | <noinclude> | ||
| + | [[Category:Color conversion templates]] | ||
| + | </noinclude> | ||
Revision as of 13:05, 2 November 2012
<p title="hsv(Expression error: Unrecognized punctuation character "[".°,Expression error: Unrecognized punctuation character "[".%,Expression error: Unrecognized punctuation character "[".%); rgb(0,0,0); #000000 "
style="width:10em;height:1em;
padding:5px;margin:auto;
background-color:rgb(0,0,0);
border: solid 1px #ccc;text-align:right;">
{{{name}}}