Difference between revisions of "Template:Color template doc/doc"
Jump to navigation
Jump to search
imported>Useddenim m (default) |
imported>Useddenim m (updated) |
||
| Line 6: | Line 6: | ||
{| class="wikitable" | {| class="wikitable" | ||
| + | |- | ||
| + | | | ||
| + | <code><nowiki>{{Template:</nowiki>''system'' color}}</code> | ||
| + | | Sample: | ||
| + | | style="width:2em; border-top:solid 1px gray; " | [[File:White grey checkerboard.svg|30px]] | ||
| + | | <code>hexval</code> | ||
|- | |- | ||
| | | | ||
| Line 29: | Line 35: | ||
The template itself is contained between table start and end markup: | The template itself is contained between table start and end markup: | ||
<code><nowiki>{| class="wikitable"</nowiki><br><nowiki> | <code><nowiki>{| class="wikitable"</nowiki><br><nowiki> | ||
| − | {{Color template doc|</nowiki> | + | {{Color template doc|</nowiki>''argument_1''<nowiki>|</nowiki>''argument_2''<nowiki>|</nowiki>''argument_3''<nowiki>}}</nowiki><br><nowiki> |
|}</nowiki></code> | |}</nowiki></code> | ||
| − | <tt> | + | <tt>''argument_1''</tt> can be omitted if the color template has only one value, or it is desired to show the default color; <tt>''argument_2''</tt> and <tt>''argument_3''</tt> are optional. All three are valid inputs for the color template. |
=== Examples === | === Examples === | ||
| − | When used on the page [[Template:Amtrak color/doc]], the code <code><nowiki>{{Color template doc|#default}}</nowiki></code> produces | + | When used on the page [[Template:Amtrak color/doc]], the code <code><nowiki>{{Color template doc|}}</nowiki></code> produces |
| + | {| class="wikitable" | ||
| + | |- | ||
| + | | {{tlc|Template:Amtrak color}} | ||
| + | | Sample: | ||
| + | | style="background:#{{Template:Amtrak color|}}; border-top:solid 1px gray; " | {{pad|2em}} | ||
| + | | <code>{{lc:{{Template:Amtrak color|}}}}</code> | ||
| + | |} | ||
| + | while the code <code><nowiki>{{Color template doc|#default}}</nowiki></code> produces | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Revision as of 12:34, 31 July 2013
| This is a documentation subpage for Template:Color template doc. It contains usage information, categories and other content that is not part of the original template page. |
This template lists as a wikitable row a template name and up to three arguments, a color sample and its hex value.
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
{{Template:Amtrak color}}
|
Sample: | style="background:#Template:Amtrak color; border-top:solid 1px gray; " | | template:amtrak color
|
while the code {{Color template doc|#default}} produces
{{Template: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
{{Template:NYCS color|blue}}
|
Sample: | 0039a6
|
Eighth Avenue | A / C / E / Eighth |