Jump to content

Template:Color/doc

From The Petit Planet Wiki
This is the documentation page for Color.
It contains usage information, categories, and other content not part of the original template page.
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: This text is colored as menu titles.
  • {{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]
  • {{Color|neighbor|Mobai|no_bold = 1}} yields: Mobai
  • {{Color|Neighbor|[[Mobai]]}} yields: Mobai

Template Data

[edit source]

Template that adds color to text.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Color1

Color type, alias, or a valid color code.

Stringrequired
Text2

Text that will be colored.

Contentsuggested
No boldno_bold

Set to 1 to disable the auto bold.

Booleanoptional