Editing Template:Color/doc

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{Documentation/Header}}
{{Documentation/Header}}
{{Lua}}
{{Lua}}
{{CSS|Gadget-Color}}
{{CSS|Template:Color/styles}}
Template that adds color to text.
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]].


==Syntax==
==Syntax==
<syntaxhighlight lang="wikitext" copy>
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.
{{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.


===Colors===
If the second parameter is missing, the first parameter will be displayed.
{| 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 21: Line 18:
! Light Theme !! Dark Theme
! Light Theme !! Dark Theme
|-
|-
| {{F|Accent}} ||  || <span style="color:#EAC863">'''#EAC863'''</span> || <span style="color:#DDBC5B">'''#DDBC5B'''</span>
! colspan="4" | <center>Highlight Colors<center/>
|-
|-
| {{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>
Line 41: Line 38:


==Examples==
==Examples==
===Default===
* {{T|Color|buzz|This text is colored as buzzwords|_Y_=1}}
* {{T|Color|accent|This text is colored as accents.|_Y_=1}}
* {{T|Color|neighbor|This text is colored as highlighted words|_Y_=1}}
* {{T|Color|buzz|This text is colored as buzzwords.|_Y_=1}}
* {{T|Color|menu|This text is colored as menu titles|_Y_=1}}
* {{T|Color|neighbor|This text is colored as highlighted words.|_Y_=1}}
* {{T|Color|new|This text is colored as new|_Y_=1}}
* {{T|Color|menu|This text is colored as menu titles.|_Y_=1}}
* {{T|Color|old|This text is colored as old|_Y_=1}}
* {{T|Color|new|This text is colored as new.|_Y_=1}}
* {{T|Color|help|This text is colored as item highlight and help text|_Y_=1}}
* {{T|Color|old|This text is colored as old.|_Y_=1}}
* {{T|Color|catch|This text is colored as catch text|_Y_=1}}
* {{T|Color|help|This text is colored as item highlight and help text.|_Y_=1}}
* {{T|Color|whisper|This text is colored as whispers|_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>
Please note that all contributions to The Petit Planet Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Petit Planet Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template
Below are commonly used wikitext from MediaWiki:Edittools. Click on any to insert them in the edit box.
File Pages==Summary====Licensing=={{Fairuse}}{{File|}}
Dynamic Page List¦²«»²{¦}²«»«/»«!----»
Array in DPL¹^2{}^2^2{¹}^2
Parser Functions{{#if:||}}
{{#ifeq:|||}}
{{#expr:}}
{{#switch:||#default=}}
{{#replace:||}}
{{#titleparts:}}
{{#tag:|}}
Markup{{}}|[][[]][[Category:]]#REDIRECT [[]] [[Category:Redirect Pages]]<code></code><includeonly></includeonly><noinclude></noinclude><nowiki></nowiki><!----><br>§
Notices{{Stub|}}{{Stub Dialogue}}{{Upcoming}}{{Under Construction}}{{Placeholder|}}
Magic Words{{!}}{{formatnum:}}{{lc:}}{{uc:}}{{PAGENAME}}{{FULLPAGENAME}}{{ROOTPAGENAME}}{{BASEPAGENAME}}{{SUBPAGENAME}}{{DISPLAYTITLE:|noreplace}}__TOC____NOTOC____EXPECTUNUSEDCATEGORY____HIDDENCAT__
HTML Entities&mdash;&nbsp;&comma;&shy;