Difference between revisions of "Template:Colort/ColorShort"

From blackwiki
Jump to navigation Jump to search
imported>Andux
(+ color conversion, like Template:Colort/Color)
imported>Weegaweek
(better tooltip with line breaks and capitalised RGB and HSV labels)
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({{#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}}}|#=}} }}}"
+
<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}}}}}%)&#x0a;RGB ({{{r|0}}} {{{g|0}}} {{{b|0}}})&#x0a;#{{{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;

Revision as of 18:12, 30 November 2018

<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}}}