Template:Tbc

From Wikimedia Commons, the free media repository
Jump to: navigation, search
Documentation icon Documentationviewedithistorypurge

This documentation is transcluded from Template:Tbc/doc.

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-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. The hexadecimal values are displayed when the cursor is moved to the box.

Usage

{{Tbc |1= |2= |3= |4= |5= }}

Best usage is within the {{Information}} description of the file, using the parameter other_fields (example).
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
bit 1 (001) on: first line
bit 2 (010) on (checked only when bit 1 is on): first line with header
bit 4 (100) on: last line
  • 0 (000) medium line
  • 1 (001) first line
  • 3 (011) first line with header
  • 4 (100) last line
  • 5 (101) only line (1st and last = single line)
  • 7 (111) only line with header
  required
2 decimal color code for red, value 0 to 255   required
3 decimal color code for green, value 0 to 255   required
4 decimal color code for blue, value 0 to 255   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 "Color:" (singular) or "Colors:" (plural) empty optional
option more table header option parameters (see example 5) empty optional
style more table header style parameters empty 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

Examples

1. One line
{{Tbc|5|186|31|181|violet|Purple}}

     violet rendered as RGB 186 031 181 Pantone Purple

{{Tbc|7|0|0|0|}}

Color:
     rendered as RGB 000 000 000


2. Two lines

{{Tbc|1|0|115|54|green|356}}
{{Tbc|4|0|153|68|green|452-2x}}
     green rendered as RGB 000 115 054 Pantone 356
     green rendered as RGB 000 153 068 Pantone 452-2x
{{Tbc|3|237|41|35|red}}
{{Tbc|4|255|255|255|white}}
Colors:
     red rendered as RGB 237 041 035
     white rendered as RGB 255 255 255


3. 3 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 000 146 070 Pantone 17-6153
     white rendered as RGB 255 255 255 Pantone 11-0601
     red rendered as RGB 206 043 055 Pantone 18-1662
{{Tbc|3|232|125|13|<small>orange</small>|716|text='''Colour''' values}}
{{Tbc|2|0|146|70|<small>green</small>|17-6153}}
{{Tbc|6|255|255|255|white|11-0601}}
Colour values
     orange rendered as RGB 232 125 013 Pantone 716
     green rendered as RGB 000 146 070 Pantone 17-6153
     white rendered as RGB 255 255 255 Pantone 11-0601


4. with Other fields

{{Information
|description=description
|date=2011-11-11
|source={{Own}}
|author={{Ut|Example|Author name}}
|other versions=
|other fields={{InFi|Used colors|
{{Tbc|1|255|0|0|red}}
{{Tbc|4|0|0|255|blue}}}}}}
Description

description

Date
Source Own work
Author Author name
Used colors
     red rendered as RGB 255 000 000
     blue rendered as RGB 000 000 255


5. with an option

     purple rendered as RGB 204 000 204
     blue rendered as RGB 000 000 255
{{Tbc|1|204|0|204|purple|option=align=right}}
{{Tbc|4|0|0|255|blue}}


See also