Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
If you make an edit, a temporary account will be created for you.

Template:Color/doc: Difference between revisions

Template page
the table is straight up wrong, but needed a doc somewhere.
ReisuDesign (talk | contribs)
No edit summary
 
(4 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>
|-
|Buzzword || {{F|Bz}}, {{F|Buzz}} || colspan="2" | <span style="color:#FFAF2A">'''#FFAF2A'''</span>
|-
|-
|Highlight || {{F|h}} || <span style="color:#55771F">'''#55771F'''</span> || <span style="color:#A6EC34">'''#A6EC34'''</span>  
| {{F|Buzz}} || {{F|Buzzword}}, {{F|Bz}} || <span style="color:#499AA1">'''#499AA1'''</span> || <span style="color:#54B2BA">'''#54B2BA'''</span>
|-
|-
|Green || {{F|New}} || colspan="2" | <span style="color:#2BAD00">'''#2BAD00'''</span>  
| {{F|Highlight}} || {{F|Neighbor}} || <span style="color:#80A132">'''#80A132'''</span> || <span style="color:#9DC43D">'''#9DC43D'''</span>  
|-
|-
|Help || {{F|Tutorial}} || <span style="color:#BB8010">'''#BB8010'''</span> || <span style="color:#E0BB00">'''#E0BB00'''</span>  
| {{F|Menu}} ||  || <span style="color:#937C6E">'''#937C6E'''</span> || <span style="color:#D3BC8E">'''#D3BC8E'''</span>
|-
|-
|Menu || {{F|Action}} || <span style="color:#937C6E">'''#937C6E'''</span> || <span style="color:#D3BC8E">'''#D3BC8E'''</span>  
| {{F|New}} || {{F|Green}} || <span style="color:#317E2A">'''#317E2A'''</span> || <span style="color:#41BE3A">'''#41BE3A'''</span>
|-
|-
|Red || {{F|Old}} || colspan="2" | <span style="color:#CF4029">'''#CF4029'''</span>  
| {{F|Old}} || {{F|Red}} || <span style="color:#932015">'''#932015'''</span> || <span style="color:#ED6D59">'''#ED6D59'''</span>
|-
|-
|Whisper || {{F|wp}} || colspan="2" | <span style="color:#CF4029">'''#B5B5B5'''</span>  
| {{F|Help}} || {{F|Tutorial}}, {{F|Item}} || <span style="color:#BB8010">'''#BB8010'''</span> || <span style="color:#E0BB00">'''#E0BB00'''</span>
|-
|-
! colspan="4" | <center>Attribute Colors<center/>
| {{F|Catch}} ||  || <span style="color:#17744B">'''#17744B'''</span> || <span style="color:#85CDAE">'''#85CDAE'''</span>
|-
|-
|Electric || {{F|shock}}, {{F|zap}} || colspan="2" | <span style="color:#33B6FE">'''#33B6FE'''</span>
| {{F|Whisper}} || {{F|wp}} || <span style="color:#919175">'''#919175'''</span> || <span style="color:#7C7F91">'''#7C7F91'''</span>  
|-
|Ether || {{F|corrupted}}, {{F|corruption}}, {{F|auric ink}} || colspan="2" | <span style="color:#FE427E">'''#FE427E'''</span>
|-
|Fire|| {{F|Burn}}, {{F|Blaze}} || colspan="2" |  <span style="color:#FF5623">'''#FF5623'''</span>
|-
|Ice || {{F|Freeze}}, {{F|Freezing}}, {{F|frost}}, {{F|Frostbite}}, {{F|Frostburn}}, {{F|Frozen}}, {{F|Shatter}},  || <span style="color:#1DAFAD">'''#1DAFAD'''</span> || <span style="color:#95EAE9">'''#95EAE9'''</span>
|-
|Physical || {{F|Assault}}, {{F|Flinch}} || <span style="color:#C2A30A">'''#C2A30A'''</span> || <span style="color:#EDCC2C">'''#EDCC2C'''</span>
|-
|Wind || || <span style="color:#0AC272">'''#0AC272'''</span> || <span style="color:#4BEEA7">'''#4BEEA7'''</span>
|-
! colspan="4" | <center>Other Text Colors<center/>
|-
|Fairy|| || <span style="color:#06B4E0">'''#06B4E0'''</span> || <span style="color:#56D6F6">'''#56D6F6'''</span>  
|-
|Hacked || || colspan="2" | <span style="color:#C0232A">'''#C0232A'''</span>
|}
|}


==Examples==
==Examples==
* {{T|Color|Buzzword|This text is colored as quest buzzwords|_Y_=1}}
===Default===
* {{T|Color|menu|This text is colored as menu titles|_Y_=1}}
* {{T|Color|accent|This text is colored as accents.|_Y_=1}}
* {{T|Color|highlight|This text is colored as highlighted|_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|whisper|This text is colored as whispers|_Y_=1}}
* {{T|Color|old|This text is colored as old.|_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>