Difference between revisions of "Template:Colort"

From blackwiki
Jump to navigation Jump to search
imported>Crissov
({{{alias title}}}, because “CSS, SVG, HTML” not always applies)
imported>Crissov
(added {{{narrow}}} parameter for {{colort/2row}})
Line 1: Line 1:
{| class="wikitable sortable {{{class|}}}" style="padding:2px;{{{style|}}}"
+
{| class="wikitable {{#if:{{{narrow|}}}||sortable}} {{{class|}}}" style="padding:2px;{{{style|}}}"
 
|+ {{{caption|Color names}}}
 
|+ {{{caption|Color names}}}
!style="width:4em" class="unsortable"| Color
+
{{#if:{{{narrow|}}}
!style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;"| Name
+
|<!--narrow color table-->
!style="border-left:solid 2px #AAA;border-right:solid 1px #AAA;" title="Hexadecimal triplet"| [[Web colors#Hex triplet|Hex]] <small>(RGB)</small>
+
!style="width:{{{width|4em}}}" rowspan="2"{{!}} Color
!style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;width:3em;"| [[RGB|Red]]<br /> <small>(RGB)</small>
+
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 2px {{{border|#AAA}}};" rowspan="2"{{!}} [[X11 color names|Name(s)]]
!style="border-left:solid 0px #AAA;border-right:solid 0px #AAA;width:3em;"| [[RGB|Green]]<br /> <small>(RGB)</small>
+
!colspan="4" scope="colgroup" style="border-right:solid 2px {{{border|#AAA}}}"{{!}} [[RGB]]
!style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;width:3em;"| [[RGB|Blue]]<br /> <small>(RGB)</small>
+
!colspan="3" scope="colgroup" style="border-right:solid 2px {{{border|#AAA}}}"{{!}} [[HSL and HSV|HSL / HSV]]
!style="border-left:solid 2px #AAA;border-right:solid 1px #AAA;width:3em;"| [[HSL and HSV#Hue|Hue]]<br /> <small>(HSL/HSV)</small>
+
{{!}}-
!style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;width:3em;" title="Saturation for HSL"| [[HSL and HSV#Saturation|Satur]]<br /> <small>(HSL)</small>
+
!style="border-left:solid 2px {{{border|#AAA}}};border-right:solid 1px {{{border|#AAA}}};" title="Hexadecimal triplet"{{!}} [[Web colors#Hex triplet|Hex]]
!style="border-left:solid 0px #AAA;border-right:solid 1px #AAA;width:3em;" title="Lightness"| [[HSL and HSV#Lightness|Light]]<br /> <small>(HSL)</small>
+
!style="border-left:solid 1px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} Red
!style="border-left:solid 1px #AAA;border-right:solid 0px #AAA;width:3em;" title="Saturation for HSV"| [[HSL and HSV#Saturation|Satur]]<br /> <small>(HSV)</small>
+
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} Green
!style="border-left:solid 0px #AAA;border-right:solid 2px #AAA;width:3em;" title="Value or brightness"| [[HSL and HSV#Brightness|Value]]<br /> <small>(HSV)</small>{{#if:{{{html_name|}}}{{{alias|}}}|
+
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 2px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} Blue
!!style="border-left:solid 2px #AAA;" title="{{{alias title|CSS, SVG, HTML}}}"{{!}} {{{alias|Alias}}} }} <noinclude>
+
!style="border-left:solid 2px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} Hue
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};" title="Saturation"{{!}} Satur
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 2px {{{border|#AAA}}};width:{{{colwidth|3em}}};" title="Lightness, Value or brightness"{{!}} Light / Value
 +
|<!--wide color table-->
 +
!style="width:{{{width|4em}}}" class="unsortable"{{!}} Color
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 2px {{{border|#AAA}}};"{{!}} Name
 +
!style="border-left:solid 2px {{{border|#AAA}}};border-right:solid 1px {{{border|#AAA}}};" title="Hexadecimal triplet"{{!}} [[Web colors#Hex triplet|Hex]] <small>(RGB)</small>
 +
!style="border-left:solid 1px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} [[RGB|Red]]<br /> <small>(RGB)</small>
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} [[RGB|Green]]<br /> <small>(RGB)</small>
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 2px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} [[RGB|Blue]]<br /> <small>(RGB)</small>
 +
!style="border-left:solid 2px {{{border|#AAA}}};border-right:solid 1px {{{border|#AAA}}};width:{{{colwidth|3em}}};"{{!}} [[HSL and HSV#Hue|Hue]]<br /> <small>(HSL/HSV)</small>
 +
!style="border-left:solid 1px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};" title="Saturation for HSL"{{!}} [[HSL and HSV#Saturation|Satur]]<br /> <small>(HSL)</small>
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 1px {{{border|#AAA}}};width:{{{colwidth|3em}}};" title="Lightness"{{!}} [[HSL and HSV#Lightness|Light]]<br /> <small>(HSL)</small>
 +
!style="border-left:solid 1px {{{border|#AAA}}};border-right:solid 0px {{{border|#AAA}}};width:{{{colwidth|3em}}};" title="Saturation for HSV"{{!}} [[HSL and HSV#Saturation|Satur]]<br /> <small>(HSV)</small>
 +
!style="border-left:solid 0px {{{border|#AAA}}};border-right:solid 2px {{{border|#AAA}}};width:{{{colwidth|3em}}};" title="Value or brightness"{{!}} [[HSL and HSV#Brightness|Value]]<br /> <small>(HSV)</small>{{#if:{{{html_name|}}}{{{alias|}}}|
 +
!!style="border-left:solid 2px {{{border|#AAA}}};" title="{{{alias title|CSS, SVG, HTML}}}"{{!}} {{{alias|Alias}}} }}
 +
|}}<noinclude>
 
|}
 
|}
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 08:50, 17 June 2013

Color names
Color Name Hex (RGB) Red
(RGB)
Green
(RGB)
Blue
(RGB)
Hue
(HSL/HSV)
Satur
(HSL)
Light
(HSL)
Satur
(HSV)
Value
(HSV)
Template documentation[view] [edit] [history] [purge]

Color table header, for use with {{Colort/Color}}, which generates the rows.

Usage

{{Colort|optional parameters}}

See {{Colort/Color}} for usage.

Parameters

|narrow=true
switches a narrow variant that is not sortable and has two rows per color
|caption=markup text
An alternative table caption, replaces the default
|class=HTML class
More classes to be applied to the table
|style=CSS code
More styles to be applied to the table
|html_name=true
If set an additional column header is added at the end with a default text: “Alias”
|alias=markup text
If present an additional column header is added at the end with the text provided
|alias title=plain text
The hover information to be displayed for the header cell of the optional column, default is “CSS, SVG, HTML”

Examples

See X11 color names, Web colors, List of colors, ...