Changes

Jump to navigation Jump to search
5,425 bytes added ,  09:33, 19 June 2013
{{{link target}}}
<noinclude>
{{Colort}}
</noinclude>
|-
{{Colort/{{#if:{{{narrow|}}}|2|1}}row
|code={{{code|{{#if:{{{link|}}}|{{{html_name|{{{name|{{{alias|}}}}}}}}}|rgb({{{r|0}}},{{{g|0}}},{{{b|0}}})}}}}}
|name={{#if:{{{sort|}}}|{{sort|{{{sort}}}|{{#if:{{{link|}}}|[[{{{link}}}|{{{name}}}]]|{{{name}}}}} }}|{{#if:{{{link|}}}|[[{{{link}}}|{{{name|''no name''}}}]]|{{{name|''no name''}}}}} }}
|r={{{r|0}}}
|g={{{g|0}}}
|b={{{b|0}}}
|red={{#expr:{{{r|0}}}/2.55 round 0}}
|green={{#expr:{{{g|0}}}/2.55 round 0}}
|blue={{#expr:{{{b|0}}}/2.55 round 0}}
|hex={{{hex|{{#switch:{{#expr:(({{{r|0}}})/16-0.5 round 0)mod 16}}|-1|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F|?}}{{#switch:{{#expr:({{{r|0}}})mod 16}}|-1|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F|?}}{{#switch:{{#expr:(({{{g|0}}})/16-0.5 round 0)mod 16}}|-1|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F|?}}{{#switch:{{ #expr:({{{g|0}}})mod 16}}|-1|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F|?}}{{#switch:{{#expr:(({{{b|0}}})/16-0.5 round 0)mod 16}}|-1|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F|?}}{{#switch:{{ #expr:({{{b|0}}})mod 16}}|-1|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F|?}} }}}
|h={{#switch:{{{h}}}|-|–|/|—=—||#default={{Nts|{{{h|{{#expr:{{#ifexpr:({{{r|0}}})=({{{g|0}}})and({{{g|0}}})=({{{b|0}}})|0|{{#expr:{{#ifexpr:({{{g|0}}})>=({{{r|0}}})and({{{g|0}}})>=({{{b|0}}})|{{#ifexpr:({{{r|0}}})>({{{b|0}}})|120-60*(({{{r|0}}})-({{{b|0}}}))/(({{{g|0}}})-({{{b|0}}}))|120+60*(({{{b|0}}})-({{{r|0}}}))/(({{{g|0}}})-({{{r|0}}}))}}|{{#ifexpr:({{{b|0}}})>=({{{r|0}}})and({{{b|0}}})>=({{{g|0}}})|{{#ifexpr:({{{g|0}}})>({{{r|0}}})|240-60*(({{{g|0}}})-({{{r|0}}}))/(({{{b|0}}})-({{{r|0}}}))|240+60*(({{{r|0}}})-({{{g|0}}}))/(({{{b|0}}})-({{{g|0}}}))}}|{{#ifexpr:({{{b|0}}})>({{{g|0}}})|360-60*(({{{b|0}}})-({{{g|0}}}))/(({{{r|0}}})-({{{g|0}}}))|60*(({{{g|0}}})-({{{b|0}}}))/(({{{r|0}}})-({{{b|0}}}))}}}}}} round 1}}}} round 0}} }}}|}}}}
|hue={{{hue|−{{#expr:360-{{#ifexpr:({{{r|0}}})=({{{g|0}}})and({{{g|0}}})=({{{b|0}}})|0|{{#expr:{{#ifexpr:({{{g|0}}})>=({{{r|0}}})and({{{g|0}}})>=({{{b|0}}})|{{#ifexpr:({{{r|0}}})>({{{b|0}}})|120-60*(({{{r|0}}})-({{{b|0}}}))/(({{{g|0}}})-({{{b|0}}}))|120+60*(({{{b|0}}})-({{{r|0}}}))/(({{{g|0}}})-({{{r|0}}}))}}|{{#ifexpr:({{{b|0}}})>=({{{r|0}}})and({{{b|0}}})>=({{{g|0}}})|{{#ifexpr:({{{g|0}}})>({{{r|0}}})|240-60*(({{{g|0}}})-({{{r|0}}}))/(({{{b|0}}})-({{{r|0}}}))|240+60*(({{{r|0}}})-({{{g|0}}}))/(({{{b|0}}})-({{{g|0}}}))}}|{{#ifexpr:({{{b|0}}})>({{{g|0}}})|360-60*(({{{b|0}}})-({{{g|0}}}))/(({{{r|0}}})-({{{g|0}}}))|60*(({{{g|0}}})-({{{b|0}}}))/(({{{r|0}}})-({{{b|0}}}))}}}}}} round 1}}}} round 0}}}}}
|sat={{{sat|{{#expr:100*{{#ifexpr:({{{r|0}}})=({{{g|0}}})and({{{g|0}}})=({{{b|0}}})|0|{{#expr:{{#ifexpr:({{{g|0}}})>=({{{r|0}}})and({{{g|0}}})>=({{{b|0}}})|{{#ifexpr:({{{r|0}}})>({{{b|0}}})|(({{{g|0}}})-({{{b|0}}}))/({{#ifexpr:({{{g|0}}})+({{{b|0}}})>255|510-({{{g|0}}})-({{{b|0}}})|({{{g|0}}})+({{{b|0}}})}})|(({{{g|0}}})-({{{r|0}}}))/({{#ifexpr:({{{g|0}}})+({{{r|0}}})>255|510-({{{g|0}}})-({{{r|0}}})|({{{g|0}}})+({{{r|0}}})}})}}|{{#ifexpr:({{{r|0}}})>=({{{b|0}}})and({{{r|0}}})>=({{{g|0}}})|{{#ifexpr:({{{b|0}}})>({{{g|0}}})|(({{{r|0}}})-({{{g|0}}}))/({{#ifexpr:({{{r|0}}})+({{{g|0}}})>255|510-({{{r|0}}})-({{{g|0}}})|({{{r|0}}})+({{{g|0}}})}})|(({{{r|0}}})-({{{b|0}}}))/({{#ifexpr:({{{r|0}}})+({{{b|0}}})>255|510-({{{r|0}}})-({{{b|0}}})|({{{r|0}}})+({{{b|0}}})}})}}|{{#ifexpr:({{{g|0}}})>({{{r|0}}})|(({{{b|0}}})-({{{r|0}}}))/({{#ifexpr:({{{b|0}}})+({{{r|0}}})>255|510-({{{b|0}}})-({{{r|0}}})|({{{b|0}}})+({{{r|0}}})}})|(({{{b|0}}})-({{{g|0}}}))/({{#ifexpr:({{{b|0}}})+({{{g|0}}})>255|510-({{{b|0}}})-({{{g|0}}})|({{{b|0}}})+({{{g|0}}})}})}}}}}} round 3}}}} round 0}}}}}
|l={{{l|{{#expr:100*{{#expr:({{#ifexpr:({{{r|0}}})>=({{{g|0}}})and({{{g|0}}})>=({{{b|0}}})or({{{b|0}}})>=({{{g|0}}})and({{{g|0}}})>=({{{r|0}}})|({{{r|0}}})+({{{b|0}}})|{{#ifexpr:({{{g|0}}})>=({{{b|0}}})and({{{b|0}}})>=({{{r|0}}})or({{{r|0}}})>=({{{b|0}}})and({{{b|0}}})>=({{{g|0}}})|({{{g|0}}})+({{{r|0}}})|({{{b|0}}})+({{{g|0}}})}}}})/510 round 3}} round 0}}}}}
|s={{{s|{{#expr:100*{{#ifexpr:({{{r|0}}})+({{{g|0}}})+({{{b|0}}})=0|0|{{#expr:abs({{#ifexpr:({{{r|0}}})>=({{{g|0}}})and({{{g|0}}})>=({{{b|0}}})or({{{b|0}}})>=({{{g|0}}})and({{{g|0}}})>=({{{r|0}}})|({{{r|0}}})-({{{b|0}}})|{{#ifexpr:({{{g|0}}})>=({{{b|0}}})and({{{b|0}}})>=({{{r|0}}})or({{{r|0}}})>=({{{b|0}}})and({{{b|0}}})>=({{{g|0}}})|({{{g|0}}})-({{{r|0}}})|({{{b|0}}})-({{{g|0}}})}}}})/({{#ifexpr:({{{r|0}}})>=({{{g|0}}})and({{{r|0}}})>=({{{b|0}}})|({{{r|0}}})|{{#ifexpr:({{{g|0}}})>=({{{r|0}}})and({{{g|0}}})>=({{{b|0}}})|({{{g|0}}})|({{{b|0}}})}}}}) round 3}}}} round 0}}}}}
|v={{{v|{{#expr:100*{{#expr:({{#ifexpr:({{{r|0}}})>=({{{g|0}}})and({{{r|0}}})>=({{{b|0}}})|({{{r|0}}})|{{#ifexpr:({{{g|0}}})>=({{{r|0}}})and({{{g|0}}})>=({{{b|0}}})|({{{g|0}}})|({{{b|0}}})}}}})/255 round 3}} round 0}}}}}
|alias={{{html_name|{{{alias|}}}}}}
|border={{{border|#AAA}}}
|padding={{{padding|{{#if:{{{narrow|}}}|0|21px}}}}}
|width={{{width|{{#if:{{{narrow|}}}|1em|4em}}}}}
|id={{{link target|}}}
}}<noinclude>
|}
{{documentation}}
<!--
Templates that have been subst:ituted to increase performance:
* {{tl|hex3}} or trice {{tl|hex2}}
* {{tl|RGBtoHSL.H}}
* {{tl|RGBtoHSL.S}}
* {{tl|RGBtoHSL.L}}
* {{tl|RGBtoHSV.S}}
* {{tl|RGBtoHSV.V}}
-->
</noinclude>
Anonymous user

Navigation menu