Difference between revisions of "Template:Tbc"
Mediawiki>HFWMan (カラーレンダリング◯) |
m (1 revision imported) |
Latest revision as of 07:59, 24 January 2022
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) | 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
This template is not intended to be localized.
With Igen
30px | This template 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 181Pantone 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 54Pantone 356 |
green | rendered as RGB | 0 153 68Pantone 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 70Pantone 17-6153 |
white | rendered as RGB 255 255 255 | Pantone 11-0601 |
red | rendered as RGB 206 | 43 55Pantone 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 | 13Pantone | 716
green | rendered as RGB | 0 146 70Pantone 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}} }}
⧼wm-license-information-description⧽ |
description |
||||||||
⧼wm-license-information-date⧽ | 2013 | ||||||||
⧼wm-license-information-source⧽ | ⧼Wm-license-own-work⧽ | ||||||||
⧼wm-license-information-author⧽ | Author name | ||||||||
Wikimedia colors ("websave" colors) |
|
5. with Other fields and Template:Information field
{{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|red}} {{Tbc|0|255|140|0|orange}} {{Tbc|0|255|237|0|yellow}} {{Tbc|0|0|128|38|green}} {{Tbc|0|0|77|255|blue}} {{Tbc|4|117|7|135|purple}} }}
⧼wm-license-information-description⧽ |
description |
||||||||||||
⧼wm-license-information-date⧽ | 2011 | ||||||||||||
⧼wm-license-information-source⧽ | ⧼Wm-license-own-work⧽ | ||||||||||||
⧼wm-license-information-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}} }}
⧼wm-license-information-description⧽ |
Wikimedia colors wm blue wm green wm red
|
||||
Used color |
| ||||
⧼wm-license-information-date⧽ | 2019-8-4 | ||||
⧼wm-license-information-source⧽ | ⧼Wm-license-own-work⧽ | ||||
⧼wm-license-information-author⧽ | Author name | ||||
Used colors |
| ||||
TBC genesis | 14px This graphic was created with 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