Template:Color/doc: Difference between revisions
Template page
More actions
Created page with "{{Documentation subpage}} __NOTOC__ <!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE --> {{high-use}} {{Warning |'''Prose text intended for readers should never be manually colored.''' (MOS:PROSECOLOR)}} {{Uses TemplateStyles|Template:Color/styles.css}} {{tl|color}} can be used to specify the foreground color of a span of text. Acceptable values are RGB hex codes, e.g. #C9E72A, or any of the web colors: red, blue, green, m..." |
No edit summary |
||
Line 1: | Line 1: | ||
== | ;Description | ||
:This template is used to provide a quick & dirty way of adding pre-defined colors to various elements. | |||
;Syntax | |||
:Type {{t|Color|param1|style=code}} somewhere. | |||
;Sample output | |||
:<code><nowiki>{{</nowiki>Color<nowiki>|Unique}}</nowiki></code> gives... | |||
:{{Color|Unique}} | |||
:{|style="border: solid #black 1px; line-height:1; background: grey; color: black; width: 450px; padding: 0.3em; text-align: left; clear:none;" | |||
! !! !! Css variable | |||
|- | |||
| style="background: #{{Color|Border}}; width: 30px"|<nowiki> </nowiki> | |||
|Border | |||
| style="font-size: 80%;"| --custom-color-template-border | |||
|- | |||
| style="background: #{{Color|Background}}"|<nowiki> </nowiki> | |||
|Background | |||
| style="font-size: 80%;"| --custom-color-template-background | |||
|- | |||
| style="background: #{{Color|Background2}}"|<nowiki> </nowiki> | |||
|Background2 | |||
| style="font-size: 80%;"| --custom-color-template-background2 | |||
|- | |||
| style="background: #{{Color|DarkText}}"|<nowiki> </nowiki> | |||
|DarkText | |||
| style="font-size: 80%;"| --custom-color-template-darktext | |||
|- | |||
| style="background: #{{Color|GreyText}}"|<nowiki> </nowiki> | |||
|GreyText | |||
| style="font-size: 80%;"| --custom-color-template-greytext | |||
|- | |||
| style="background: #{{Color|GreyText2}}"|<nowiki> </nowiki> | |||
|GreyText2 | |||
| style="font-size: 80%;"| --custom-color-template-greytext2 | |||
|- | |||
| style="background: #{{Color|RedText}}"|<nowiki> </nowiki> | |||
|RedText | |||
| style="font-size: 80%;"| --custom-color-template-redtext | |||
|- | |||
| style="background: #{{Color|Title}}"|<nowiki> </nowiki> | |||
|Title | |||
| style="font-size: 80%;"| --custom-color-template-title | |||
|- | |||
| style="background: #{{Color|Vendor}}"|<nowiki> </nowiki> | |||
|Vendor | |||
| style="font-size: 80%;"| --custom-color-template-vendor | |||
|- | |||
| style="background: #{{Color|WikiHeader}}"|<nowiki> </nowiki> | |||
|WikiHeader | |||
| style="font-size: 80%;"| --custom-color-template-wikiheader | |||
|- | |||
| style="background: #{{Color|LightText}}"|<nowiki> </nowiki> | |||
|LightText | |||
| style="font-size: 80%;"| --custom-color-template-lighttext | |||
|- | |||
| style="background: #{{Color|White}}"|<nowiki> </nowiki> | |||
|White | |||
| style="font-size: 80%;"| --custom-color-template-white | |||
|- | |||
| style="background: #{{Color|Yellow}}"|<nowiki> </nowiki> | |||
|Yellow | |||
| style="font-size: 80%;"| --custom-color-template-yellow | |||
|- | |||
| style="background: #{{Color|ItemStandard}}"|<nowiki> </nowiki> | |||
|ItemStandard | |||
| style="font-size: 80%;"| --custom-color-template-itemstandard | |||
|- | |||
| style="background: #{{Color|Unique}}"|<nowiki> </nowiki> | |||
|Unique | |||
| style="font-size: 80%;"| --custom-color-template-unique | |||
|- | |||
| style="background: #{{Color|Prototype}}"|<nowiki> </nowiki> | |||
|Prototype | |||
| style="font-size: 80%;"| --custom-color-template-prototype | |||
|- | |||
| style="background: #{{Color|Shoddy}}"|<nowiki> </nowiki> | |||
|Shoddy | |||
| style="font-size: 80%;"| --custom-color-template-shoddy | |||
|- | |||
| style="background: #{{Color|Standard}}"|<nowiki> </nowiki> | |||
|Standard | |||
| style="font-size: 80%;"| --custom-color-template-standard | |||
|- | |||
| style="background: #{{Color|High}}"|<nowiki> </nowiki> | |||
|High | |||
| style="font-size: 80%;"| --custom-color-template-high | |||
|- | |||
| style="background: #{{Color|Specialist}}"|<nowiki> </nowiki> | |||
|Specialist | |||
| style="font-size: 80%;"| --custom-color-template-specialist | |||
|- | |||
| style="background: #{{Color|Masterwork}}"|<nowiki> </nowiki> | |||
|Masterwork | |||
| style="font-size: 80%;"| --custom-color-template-masterwork | |||
|- | |||
|} | |||
;See also: | |||
: [[Template:Grade]] | |||
: [[Template:Grade/Short]] | |||
;TemplateData | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": "This template is used to provide a quick & dirty way of adding pre-defined colors to various elements.", | |||
"params": { | |||
"1": { | |||
"label": "Color", | |||
"description": "Pre-defined color's name - chosen from the suggested values.", | |||
"required": true, | |||
"type": "line", | |||
"suggestedvalues": [ | |||
"Border", | |||
"Background", | |||
"Background2", | |||
"DarkText", | |||
"GreyText", | |||
"GreyText2", | |||
"Title", | |||
"RedText", | |||
"Vendor", | |||
"WikiHeader", | |||
"LightText", | |||
"White", | |||
"Yellow", | |||
"ItemStandard", | |||
"Unique", | |||
"Prototype", | |||
"Shoddy", | |||
"Standard", | |||
"High", | |||
"Specialist", | |||
"Masterwork" | |||
] | |||
} | |||
}, | |||
"format": "inline" | |||
} | } | ||
</templatedata> | </templatedata> | ||
<includeonly> | <includeonly> | ||
<!-- Categories/interwikis for the template --> | |||
[[Category: | [[Category:Templates]] | ||
</includeonly><noinclude> | |||
<!-- Categories/interwikis for this documentation --> | |||
[[Category:Template documentation]] | |||
</noinclude> | |||
[[Category:Template documentation pages|Color/doc]] |
Latest revision as of 02:29, 14 June 2025
- Description
- This template is used to provide a quick & dirty way of adding pre-defined colors to various elements.
- Syntax
- Type {{Color}} somewhere.
- Sample output
{{Color|Unique}}
gives...- 67d1b4
Css variable style="background: #292929; width: 30px"| Border --custom-color-template-border style="background: #322d2a"| Background --custom-color-template-background style="background: #26211e"| Background2 --custom-color-template-background2 style="background: #2e201d"| DarkText --custom-color-template-darktext style="background: #635e5b"| GreyText --custom-color-template-greytext style="background: #4c443b"| GreyText2 --custom-color-template-greytext2 style="background: #59231a"| RedText --custom-color-template-redtext style="background: #492620"| Title --custom-color-template-title style="background: #746659"| Vendor --custom-color-template-vendor style="background: #7d7065"| WikiHeader --custom-color-template-wikiheader style="background: #b0a68b"| LightText --custom-color-template-lighttext style="background: #C0C0C0"| White --custom-color-template-white style="background: #b3b282"| Yellow --custom-color-template-yellow style="background: #e0cccc"| ItemStandard --custom-color-template-itemstandard style="background: #67d1b4"| Unique --custom-color-template-unique style="background: #666666"| Prototype --custom-color-template-prototype style="background: #d9ccbf"| Shoddy --custom-color-template-shoddy style="background: #4099b3"| Standard --custom-color-template-standard style="background: #66fc80"| High --custom-color-template-high style="background: #fceb0d"| Specialist --custom-color-template-specialist style="background: #fceb0d"| Masterwork --custom-color-template-masterwork
- See also
- Template:Grade
- Template:Grade/Short
- TemplateData
This template is used to provide a quick & dirty way of adding pre-defined colors to various elements.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Color | 1 | Pre-defined color's name - chosen from the suggested values.
| Line | required |