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 Template:Color/styles.css.

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 Admins.

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.

If the second parameter is missing, the first parameter will be displayed.

Use the link parameter to set a link for the text to link to. Set as 1 to use text as link.

Type Aliases Color
Light Theme Dark Theme
Highlight Colors
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

  • {{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