Difference between revisions of "Template:Colort/Color"
Jump to navigation
Jump to search
imported>Ehird (add a in the W3C name field if none is specified) |
imported>Ehird m (fix again) |
||
| Line 12: | Line 12: | ||
|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;"| {{#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|—}}}% | |style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;text-align:right;"| {{{s|—}}}% | ||
| − | |style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;text-align:right;"| {{{v|—}}}% | + | |style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;text-align:right;"| {{{v|—}}}% |
| − | + | |style="border-left:solid 2px #AAA;"| {{{html_name| }}}<noinclude> | |
|} | |} | ||
{{documentation | {{documentation | ||
Revision as of 03:15, 19 March 2012
| 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 "[".% | —% | —% |
File:Test Template Info-Icon - Version (2).svg 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 = 'HSL' (hue, can be automatically generated from (r,g,b) values)
}}
If not provided, HSL and hex triplet are auto-generated from r, g and b parameters. There are no color conversion templates for HSV or other notations yet (hue is the same as HSL).
Examples
See X11 color names, Web colors, or "what links here". ar:قالب:Color/Color pt:Predefinição:Colort/Color
| The above documentation is transcluded from Template:Colort/Color/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Subpages of this template. |