Difference between revisions of "Template:Colort/Color"

From blackwiki
Jump to navigation Jump to search
imported>DixonDBot
m (Migrating 1 interwiki links, now provided by Wikidata on d:Q6799360)
imported>Crissov
(padding-right: 21px; because of sort buttons in header cells)
Line 6: Line 6:
 
!style="text-align:left; font-weight:normal"| {{#if:{{{sort|}}}|{{sort|{{{sort}}}|{{{name}}} }}|{{{name}}} }}
 
!style="text-align:left; font-weight:normal"| {{#if:{{{sort|}}}|{{sort|{{{sort}}}|{{{name}}} }}|{{{name}}} }}
 
|style="border-left:solid 2px #AAA;border-right:solid 1px #AAA;font-family:monospace;"| #{{{hex|{{hex3|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|#=}} }}}
 
|style="border-left:solid 2px #AAA;border-right:solid 1px #AAA;font-family:monospace;"| #{{{hex|{{hex3|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|#=}} }}}
|style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;" title="{{{r|0}}}/255"| {{#expr:{{{r|0}}}/2.55 round 0}}%  
+
|style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;padding-right: 21px;" title="{{{r|0}}}/255"| {{#expr:{{{r|0}}}/2.55 round 0}}%  
|style="border-left:solid 0px #AAA;border-right:solid 0px #AAA;text-align:right;" title="{{{g|0}}}/255"| {{#expr:{{{g|0}}}/2.55 round 0}}%
+
|style="border-left:solid 0px #AAA;border-right:solid 0px #AAA;text-align:right;padding-right: 21px;" title="{{{g|0}}}/255"| {{#expr:{{{g|0}}}/2.55 round 0}}%
|style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;text-align:right;" title="{{{b|0}}}/255"| {{#expr:{{{b|0}}}/2.55 round 0}}%
+
|style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;text-align:right;padding-right: 21px;" title="{{{b|0}}}/255"| {{#expr:{{{b|0}}}/2.55 round 0}}%
|style="border-left:solid 2px #AAA;border-right:solid 1px #AAA;text-align:right;"| {{#ifeq:{{{h}}}|—|—|{{Nts|{{{h|{{#expr:{{RGBtoHSL.H|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}} }}}|}}°}}
+
|style="border-left:solid 2px #AAA;border-right:solid 1px #AAA;text-align:right;padding-right: 21px;"| {{#ifeq:{{{h}}}|—|—|{{Nts|{{{h|{{#expr:{{RGBtoHSL.H|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}} }}}|}}°}}
|style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;"| {{#expr:100*{{RGBtoHSL.S|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}%  
+
|style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;padding-right: 21px;"| {{#expr:100*{{RGBtoHSL.S|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}%  
|style="border-left:solid 0px #AAA;border-right:solid 1px #AAA;text-align:right;"| {{#expr:100*{{RGBtoHSL.L|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}%  
+
|style="border-left:solid 0px #AAA;border-right:solid 1px #AAA;text-align:right;padding-right: 21px;"| {{#expr:100*{{RGBtoHSL.L|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}%  
|style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;"| {{{s|{{#expr:100*{{RGBtoHSV.S|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}%  
+
|style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;padding-right: 21px;"| {{{s|{{#expr:100*{{RGBtoHSV.S|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}%  
|style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;text-align:right;"| {{{v|{{#expr:100*{{RGBtoHSV.V|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}%
+
|style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;text-align:right;padding-right: 21px;"| {{{v|{{#expr:100*{{RGBtoHSV.V|{{{r|0}}}|{{{g|0}}}|{{{b|0}}}|}} round 0}}}}}%
 
|style="border-left:solid 2px #AAA;"| {{{html_name|&nbsp;}}}<noinclude>
 
|style="border-left:solid 2px #AAA;"| {{{html_name|&nbsp;}}}<noinclude>
 
|}
 
|}

Revision as of 07:00, 17 June 2013

Colors
Name Hex
(RGB)
Red
(RGB)
Green
(RGB)
Blue
(RGB)
Hue
(HSL/HSV)
Satur.
(HSL)
Light
(HSL)
Satur.
(HSV)
Value
(HSV)
  {{{name}}} #000000 0% 0% 0% Template:Nts° Expression error: Unrecognized punctuation character "[".% Expression error: Unrecognized punctuation character "[".% Expression error: Unrecognized punctuation character "[".% Expression error: Unrecognized punctuation character "[".%  
50px Template documentation

Color table row, for use with {{Colort}}, which creates the column headings.

Usage

{{Colort/Color
|name = 'common name'
|html_name = 'html name'

|r = 'red value'
|g = 'green value'
|b = 'blue value'

|s = 'saturation percent'
|v = 'brightness percent'

|hex = 'Hex triplet' (can be automatically generated from (r,g,b) values)
|h = 'Hue' (in degrees, can be automatically generated from (r,g,b) values)
}}

If not provided, values for HSL, HSV, and hex triplet are auto-generated from r, g and b parameters.

Examples

See X11 color names, Web colors, or "what links here".