Difference between revisions of "Template:Color template doc/doc"
Jump to navigation
Jump to search
imported>Useddenim m (→Usage: update from 3 to 5) |
imported>WOSlinker (fix code tags) |
||
| Line 51: | Line 51: | ||
{{Color template doc|</nowiki>''argument_1''<nowiki>|</nowiki>''argument_2''<nowiki>|…|</nowiki>''argument_5''<nowiki>}}</nowiki><br><nowiki> | {{Color template doc|</nowiki>''argument_1''<nowiki>|</nowiki>''argument_2''<nowiki>|…|</nowiki>''argument_5''<nowiki>}}</nowiki><br><nowiki> | ||
|}</nowiki></code> | |}</nowiki></code> | ||
| − | < | + | <code>''argument_1''</code> can be omitted if the color template has only one value, or it is desired to show the default color; <code>''argument_2''</code> through <code>''argument_5''</code> are optional. All five are valid inputs for the color template. |
=== Examples === | === Examples === | ||
Revision as of 18:19, 30 July 2017
| 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 five 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_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: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