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

From blackwiki
Jump to navigation Jump to search
imported>Useddenim
m (formatting)
imported>Useddenim
m (formatting)
Line 8: Line 8:
 
|-
 
|-
 
|
 
|
<code><nowiki>{{</nowiki>''Template:system'' color}}</code>
+
<code><nowiki>{{</nowiki>Template:system color}}</code>
 
| Sample:
 
| Sample:
 
| style="width:2em; border-top:solid 1px gray; " | [[File:White grey checkerboard.svg|30px]]
 
| style="width:2em; border-top:solid 1px gray; " | [[File:White grey checkerboard.svg|30px]]

Revision as of 11:17, 24 November 2014


This template lists as a wikitable row a template name and up to three 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

Usage

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

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

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

Examples

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

{{Amtrak color}} Sample: style="background:#Template:Amtrak color; border-top:solid 1px gray; " |   template:amtrak color

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

{{Amtrak color|#default}} Sample: style="background:#Template:Amtrak color; border-top:solid 1px gray; " |   template:amtrak 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