Template:Color/doc: Difference between revisions
Appearance
No edit summary |
ReisuDesign (talk | contribs) No edit summary |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation/Header}} | {{Documentation/Header}} | ||
{{Lua}} | {{Lua}} | ||
{{CSS| | {{CSS|Gadget-Color}} | ||
Template that adds color to text. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="wikitext" copy> | |||
{{Color}} | |||
</syntaxhighlight> | |||
This template has 2 unnamed parameters: | |||
* {{F|1}} – Color type, alias, or a valid color code. | |||
* {{F|2}} – Text that will be colored. | |||
* {{F|no_bold}} – Set to {{F|1}} to disable the auto bold. | |||
===Colors=== | |||
{| class= "wikitable" | |||
{| class= "wikitable | |||
! rowspan="2" | Type | ! rowspan="2" | Type | ||
! rowspan="2" | Aliases | ! rowspan="2" | Aliases | ||
| Line 18: | Line 21: | ||
! Light Theme !! Dark Theme | ! Light Theme !! Dark Theme | ||
|- | |- | ||
| {{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> | ||
| 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 is colored as item highlight and 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> | |||
Latest revision as of 05:07, 20 September 2026
This is the documentation page for Color. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
This template uses Module:Color, a script written in Lua.
This template uses CSS found at MediaWiki:Gadget-Color.css.
Template that adds color to text.
Syntax
[edit source]{{Color}}
This template has 2 unnamed parameters:
- 1 – Color type, alias, or a valid color code.
- 2 – Text that will be colored.
- no_bold – Set to 1 to disable the auto bold.
Colors
[edit source]| Type | Aliases | Color | |
|---|---|---|---|
| Light Theme | Dark Theme | ||
| Accent | #EAC863 | #DDBC5B | |
| Buzz | Buzzword, Bz | #499AA1 | #54B2BA |
| Highlight | Neighbor | #80A132 | #9DC43D |
| Menu | #937C6E | #D3BC8E | |
| New | Green | #317E2A | #41BE3A |
| Old | Red | #932015 | #ED6D59 |
| Help | Tutorial, Item | #BB8010 | #E0BB00 |
| Catch | #17744B | #85CDAE | |
| Whisper | wp | #919175 | #7C7F91 |
Examples
[edit source]Default
[edit source]- {{Color|accent|This text is colored as accents.}} yields: This text is colored as accents.
- {{Color|buzz|This text is colored as buzzwords.}} yields: This text is colored as buzzwords.
- {{Color|neighbor|This text is colored as highlighted words.}} yields: This text is colored as highlighted words.
- {{Color|menu|This text is colored as menu titles.}} yields:
- {{Color|new|This text is colored as new.}} yields: This text is colored as new.
- {{Color|old|This text is colored as old.}} yields: This text is colored as old.
- {{Color|help|This text is colored as item highlight and help text.}} yields: This text is colored as item highlight and help text.
- {{Color|catch|This text is colored as catch text.}} yields: This text is colored as catch text.
- {{Color|whisper|This text is colored as whispers.}} yields: This text is colored as whispers.
- {{Color|common|This text is colored as common.}} yields: This text is colored as common.
- {{Color|uncommon|This text is colored as uncommon.}} yields: This text is colored as uncommon.
- {{Color|rare|This text is colored as rare.}} yields: This text is colored as rare.
- {{Color|stellar|This text is colored as stellar.}} yields: This text is colored as stellar.
- {{Color|miracle|This text is colored as miracle.}} yields: This text is colored as miracle.
- {{Color|#EA8A56|This text has custom color based on a Hex color code.}} yields: This text has custom color based on a Hex color code.
Additional
[edit source]Template Data
[edit source]Template that adds color to text.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Color | 1 | Color type, alias, or a valid color code. | String | required |
| Text | 2 | Text that will be colored. | Content | suggested |
| No bold | no_bold | Set to 1 to disable the auto bold. | Boolean | optional |