Template:Tbc
Table for colors (not an IDC-10 disease)
Creates a table to describe the colors, for flags or other colored items
May be within another table, as a files {{Information}} box or the {{Infobox flag}} description (example)
The displayed color box is tooltipped to show the #rrggbb- or #rgb-color code.
For the R/G/B-values is the decimal notation required, because it is easy to convert decimal to hexadecimal, but very laborious to convert from hexadecimal (see #With Igen).
The hexadecimal values are displayed when the cursor is moved to the box.
Usage
{{Tbc |1= |2= |3= |4= |5= |pixel= }}
Best usage is within the {{Information}} description of the file, using the parameter other_fields (example).
Use bit 8
to create a field name
, either with text=
or the defaults of {{I18n/Colors}};
otherwise see more about how to use at the documentation of {{Information field}}.
Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | specifies whether it is the first, a medium or the last line of the table
| 5 [1] | required | |
2 | decimal color code for red, value 0 to 255 | 0 [1] | required | |
3 | decimal color code for green, value 0 to 255 | 0 [1] | required | |
4 | decimal color code for blue, value 0 to 255 | 0 [1] | required | |
5 | descriptive color name (not HTML or PMS color name) can as well be a translateable color name with e.g. {{I18n/red}} - when the template exists; not for all 148 CSS color names ! | empty | optional | |
6 | Pantone name (if any) (like "9010 Pure White" or "9005 Jet Black") | empty | optional | |
text | other header text than from the translation template I18n/Colors | empty | optional | |
option | more table header option parameters (see example 6) | empty | optional | |
style | more table header style parameters | empty | optional | |
file | name of a file to be displayed right | PAGENAME | optional | |
size | display size for that file | 48 | optional | |
desc | descriptional text | empty | optional | |
pixel | display size for Easy border | 96 | optional |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Localization
To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation
" (xx
being the code of your language)
With Igen
Uses Lua: |
Special values for Tbc-parameter 1 allow to separate table initiation (code B, and F for single line) and termination (code 6),
while all table rows are specified as "medium lines" (code 0). The default field name is always generated.
See the description at Template:Image generation#Tbc.
- Examples:
1. One line
{{Tbc|5|186|31|181|violet|Purple}}
violet | rendered as RGB 186 31 181 | Pantone Purple |
{{Tbc|7}}
Used color: | ||
rendered as RGB 0 0 0 |
2. Two lines
{{Tbc|1|0|115|54|green|356}}
{{Tbc|4|0|153|68|green|452-2x}}
green | rendered as RGB 0 115 54 | Pantone 356 |
green | rendered as RGB 0 153 68 | Pantone 452-2x |
{{Tbc|3|237|41|35|red}}
{{Tbc|4|255|255|255|white}}
Used colors: | ||
red | rendered as RGB 237 41 35 | |
white | rendered as RGB 255 255 255 |
3. Three lines
{{Tbc|1|0|146|70|green|17-6153}}
{{Tbc|0|255|255|255|white|11-0601}}
{{Tbc|4|206|43|55|red|18-1662}}
green | rendered as RGB 0 146 70 | Pantone 17-6153 |
white | rendered as RGB 255 255 255 | Pantone 11-0601 |
red | rendered as RGB 206 43 55 | Pantone 18-1662 |
{{Tbc|3|232|125|13|<small>orange</small>| 716
|text='''Colour''' values|file=Flag of Niger.svg|size=96|desc=3-colored flag}}
{{Tbc|0|0|146|70|<small>green</small>|17-6153}}
{{Tbc|4|255|255|255|white|11-0601}}
Colour values | ||
orange | rendered as RGB 232 125 13 | Pantone 716 |
green | rendered as RGB 0 146 70 | Pantone 17-6153 |
white | rendered as RGB 255 255 255 | Pantone 11-0601 |
4. with field name
{{Information
|description=description
|date=2013-01-24
|source={{Own}}
|author={{Ut|Example|Author name}}
|other versions=
|other fields={{Tbc|9|0|102|153|blue|text=Wikimedia colors<br>{{nobold|("websave colors)}
|file=Wikitech logo-blank.svg|size=80|desc=WikiTech}}
{{Tbc|0|255|255|255|white}} {{Tbc|0|0|153|102|green}} {{Tbc|4|153|0|0|red}}
}}
Description | description | ||||||||
Date | |||||||||
Source | Own work | ||||||||
Author | Author name | ||||||||
Wikimedia colors ("websave" colors) |
|
5. with Other fields and Template:Information field - and translateable color names
{{Information
|description=description
|date=2011-11-11
|source={{Own}}
|author={{Ut|Example|Author name}}
|other versions=
|other fields={{InFi|Gay colors|
{{Tbc|1|228|3|3|{{I18n/red}}}}
{{Tbc|0|255|140|0|{{I18n/orange}}}}
{{Tbc|0|255|237|0|{{I18n/yellow}}}}
{{Tbc|0|0|128|38|{{I18n/green}}}}
{{Tbc|0|0|77|255|{{I18n/blue}}}}
{{Tbc|4|117|7|135|{{I18n/purple}}}} }}
}}
Description | description | ||||||||||||
Date | |||||||||||||
Source | Own work | ||||||||||||
Author | Author name | ||||||||||||
Gay colors |
|
6. with an option
purple | rendered as RGB 204 0 204 |
blue | rendered as RGB 0 0 255 |
{{Tbc|1|204|0|204|purple|option=align=right}}
{{Tbc|4|0|0|255|blue}}
7. 2 examples: {{Tbc}} with {{ColorString}}
{{Information
|description=Wikimedia colors{{ColorString| /-/#069/wm blue/#096/wm green/#900/wm red}}
|other fields 1={{ColorString| /T/#FFFFFF/white}}
|date=2019-8-4
|source={{Own}}
|author={{Ut|Example|Author name}}
|other fields={{Igen|U|+|cb=/T/LightSalmon//DarkTurquoise}}
}}
Description |
Wikimedia colors wm blue wm green wm red |
||||
Used color |
| ||||
Date | |||||
Source | Own work | ||||
Author | Author name | ||||
Used colors |
| ||||
TBC development | This graphic was created with an unknown tool. |
See also
- Web colors for colors (names etc.)
- convert RGB to Pantone (works only for some colors)
- find Pantone color
- Template {{Tincture}} for coats of arms
- Template {{Color}} for text and background