Difference between revisions of "Template:Color template doc/doc"

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(fix code tags)
imported>Mackensen
(Amtrak > GO Transit)
Line 54: Line 54:
  
 
=== Examples ===
 
=== Examples ===
When used on the page [[Template:Amtrak color/doc]], the code <code><nowiki>{{Color template doc|}}</nowiki></code> produces
+
When used on the page [[Template:GO Transit color/doc]], the code <code><nowiki>{{Color template doc|}}</nowiki></code> produces
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| {{tlc|Amtrak color}}
+
| {{tlc|NYCS color}}
 
| Sample:
 
| Sample:
| style="background:#{{Amtrak color|}}; border-top:solid 1px gray; " | {{pad|2em}}
+
| style="background:#{{GO Transit color|}}; border-top:solid 1px gray; " | {{pad|2em}}
| <code>{{lc:{{Amtrak color|}}}}</code>
+
| <code>{{lc:{{GO Transit color|}}}}</code>
 
|}
 
|}
 
while the code <code><nowiki>{{Color template doc|#default}}</nowiki></code> produces
 
while the code <code><nowiki>{{Color template doc|#default}}</nowiki></code> produces
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
| {{tlc|Amtrak color|#default}}
+
| {{tlc|GO Transit color|#default}}
 
| Sample:
 
| Sample:
| style="background:#{{Amtrak color|#default}}; border-top:solid 1px gray; " | {{pad|2em}}
+
| style="background:#{{GO Transit color|#default}}; border-top:solid 1px gray; " | {{pad|2em}}
| <code>{{lc:{{Amtrak color|#default}}}}</code>
+
| <code>{{lc:{{GO Transit color|#default}}}}</code>
 
|}
 
|}
  

Revision as of 23:45, 19 July 2019


This template lists as a wikitable row a template name and up to five arguments, a color sample and its hex value.

{{Template:system color}}

Sample: White grey checkerboard.svg hexval

{{Template:system color|argument_1}}

Sample: White grey checkerboard.svg hexval

{{Template:system color|argument_1}} or …|argument_2}}

Sample: White grey checkerboard.svg hexval

{{Template:system color|argument_1}} or …|argument_2}} or …|argument_3}}

Sample: White grey checkerboard.svg hexval

{{Template:system color|argument_1}} or …|argument_2}} or …|argument_3}} or …|argument_4}}

Sample: White grey checkerboard.svg hexval

{{Template:system color|argument_1}} or …|argument_2}} or …|argument_3}} or …|argument_4}} or …|argument_5}}

Sample: White grey checkerboard.svg hexval

Usage

The template itself is contained between table start and end markup:

{| class="wikitable"
{{Color template doc|argument_1|argument_2|…|argument_5}}
|}

argument_1 can be omitted if the color template has only one value, or it is desired to show the default color; argument_2 through argument_5 are optional. All five are valid inputs for the color template.

Examples

When used on the page Template:GO Transit color/doc, the code {{Color template doc|}} produces

{{NYCS color}} Sample: style="background:#Template:GO Transit color; border-top:solid 1px gray; " |   template:go transit color

while the code {{Color template doc|#default}} produces

{{GO Transit color|#default}} Sample: style="background:#Template:GO Transit color; border-top:solid 1px gray; " |   template:go transit color

Additional information can be added to the table. On the page Template:NYCS color/doc the code

{{Color template doc|blue}}
| [[IND Eighth Avenue Line|Eighth Avenue]]
| A / C / E / Eighth

produces

{{NYCS color|blue}} Sample:   0039a6 Eighth Avenue A / C / E / Eighth

See also