Template:Color/doc: Difference between revisions

Updated
ReisuDesign (talk | contribs)
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Documentation/Header}}
{{Documentation/Header}}
{{Lua}}
{{Lua}}
{{CSS|Template:Color/styles}}
{{CSS|Gadget-Color}}
This '''Color''' template is used to add predefined formatted color to text. This uses the color classes in [[Template:Color/styles.css]]. If you want make additions or changes, please send suggestions to the [[Special:ListAdmins|Admins]].
Template that adds color to text.


==Syntax==
==Syntax==
There are two unnamed parameters that can be used. The first parameter declares the type of color (based on element or other identifier determined beforehand), and the second parameter is used to display the text.
<syntaxhighlight lang="wikitext" copy>
{{Color}}
</syntaxhighlight>
This template has 2 unnamed parameters:
* {{F|1}} &ndash; Color type, alias, or a valid color code.
* {{F|2}} &ndash; Text that will be colored.
* {{F|no_bold}} &ndash; Set to {{F|1}} to disable the auto bold.


If the second parameter is missing, the first parameter will be displayed.
===Colors===
 
{| class= "wikitable"
Use the '''link''' parameter to set a link for the text to link to. Set as ''1'' to use text as link.
 
{| class= "wikitable tdc3 tdc4 thc3 thc4"
! rowspan="2" | Type
! rowspan="2" | Type
! rowspan="2" | Aliases  
! rowspan="2" | Aliases  
Line 18: Line 21:
! Light Theme !! Dark Theme
! Light Theme !! Dark Theme
|-
|-
! colspan="4" | <center>Highlight Colors<center/>
| {{F|Accent}} ||  || <span style="color:#EAC863">'''#EAC863'''</span> || <span style="color:#DDBC5B">'''#DDBC5B'''</span>
|-
|-
| {{F|Buzz}} || {{F|Buzzword}}, {{F|Bz}} || <span style="color:#499AA1">'''#499AA1'''</span> || <span style="color:#54B2BA">'''#54B2BA'''</span>
| {{F|Buzz}} || {{F|Buzzword}}, {{F|Bz}} || <span style="color:#499AA1">'''#499AA1'''</span> || <span style="color:#54B2BA">'''#54B2BA'''</span>
|-
|-
| {{F|Highlight}} || {{F|Neighbor}}, {{F|Neighbour}} || <span style="color:#80A132">'''#80A132'''</span> || <span style="color:#9DC43D">'''#9DC43D'''</span>  
| {{F|Highlight}} || {{F|Neighbor}} || <span style="color:#80A132">'''#80A132'''</span> || <span style="color:#9DC43D">'''#9DC43D'''</span>  
|-
|-
| {{F|Menu}} ||  || <span style="color:#937C6E">'''#937C6E'''</span> || <span style="color:#D3BC8E">'''#D3BC8E'''</span>
| {{F|Menu}} ||  || <span style="color:#937C6E">'''#937C6E'''</span> || <span style="color:#D3BC8E">'''#D3BC8E'''</span>
Line 30: Line 33:
| {{F|Old}} || {{F|Red}} || <span style="color:#932015">'''#932015'''</span> || <span style="color:#ED6D59">'''#ED6D59'''</span>
| {{F|Old}} || {{F|Red}} || <span style="color:#932015">'''#932015'''</span> || <span style="color:#ED6D59">'''#ED6D59'''</span>
|-
|-
| {{F|Help}} || {{F|Tutorial}} || <span style="color:#BB8010">'''#BB8010'''</span> || <span style="color:#E0BB00">'''#E0BB00'''</span>
| {{F|Help}} || {{F|Tutorial}}, {{F|Item}} || <span style="color:#BB8010">'''#BB8010'''</span> || <span style="color:#E0BB00">'''#E0BB00'''</span>
|-
|-
| {{F|Catch}} ||  || <span style="color:#17744B">'''#17744B'''</span> || <span style="color:#85CDAE">'''#85CDAE'''</span>
| {{F|Catch}} ||  || <span style="color:#17744B">'''#17744B'''</span> || <span style="color:#85CDAE">'''#85CDAE'''</span>
Line 38: Line 41:


==Examples==
==Examples==
* {{T|Color|buzz|This text is colored as buzzwords|_Y_=1}}
===Default===
* {{T|Color|neighbor|This text is colored as highlighted words|_Y_=1}}
* {{T|Color|accent|This text is colored as accents.|_Y_=1}}
* {{T|Color|menu|This text is colored as menu titles|_Y_=1}}
* {{T|Color|buzz|This text is colored as buzzwords.|_Y_=1}}
* {{T|Color|new|This text is colored as new|_Y_=1}}
* {{T|Color|neighbor|This text is colored as highlighted words.|_Y_=1}}
* {{T|Color|old|This text is colored as old|_Y_=1}}
* {{T|Color|menu|This text is colored as menu titles.|_Y_=1}}
* {{T|Color|help|This text has the tutorial help text|_Y_=1}}
* {{T|Color|new|This text is colored as new.|_Y_=1}}
* {{T|Color|catch|This text is colored as catch text|_Y_=1}}
* {{T|Color|old|This text is colored as old.|_Y_=1}}
* {{T|Color|whisper|This text is colored as whispers|_Y_=1}}
* {{T|Color|help|This text is colored as item highlight and help text.|_Y_=1}}
* {{T|Color|catch|This text is colored as catch text.|_Y_=1}}
* {{T|Color|whisper|This text is colored as whispers.|_Y_=1}}
* {{T|Color|common|This text is colored as common.|_Y_=1}}
* {{T|Color|uncommon|This text is colored as uncommon.|_Y_=1}}
* {{T|Color|rare|This text is colored as rare.|_Y_=1}}
* {{T|Color|stellar|This text is colored as stellar.|_Y_=1}}
* {{T|Color|miracle|This text is colored as miracle.|_Y_=1}}
* {{T|Color|#EA8A56|This text has custom color based on a Hex color code.|_Y_=1}}
 
===Additional===
* {{T|Color|neighbor|Mobai|no_bold=1|_Y_=1}}
* {{T|Color|Neighbor|[[Mobai]]|_Y_=1}}
 
==Template Data==
<templatedata>
{
"params": {
"1": {
"label": "Color",
"description": "Color type, alias, or a valid color code.",
"type": "string",
"required": true
},
"2": {
"label": "Text",
"description": "Text that will be colored.",
"type": "content",
"suggested": true
},
"no_bold": {
"label": "No bold",
"description": "Set to 1 to disable the auto bold.",
"type": "boolean"
}
},
"description": "Template that adds color to text.",
"format": "inline"
}
</templatedata>