Jump to content

Module:Color/doc

From PokeHero Official Wiki
Revision as of 16:42, 20 September 2025 by Admin (talk | contribs) (Created page with "== Module:Color == This Lua module provides a color lookup system for PokeHero wiki content. === Usage === Use the module in wikitext with: <pre> {{#invoke:Color|color|<keyword>|<colType>}} </pre> * <code>keyword</code> – the keyword associated with the color: "mental", "physical", etc. * <code>colType</code> – the color type you need: "color", "text", etc. === Example === <pre> {{#invoke:Color|color|fighting|color}} </pre> This will return the color code for the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Color

Module:Color

This Lua module provides a color lookup system for PokeHero wiki content.

Usage

Use the module in wikitext with:

{{#invoke:Color|color|<keyword>|<colType>}}
  • keyword – the keyword associated with the color: "mental", "physical", etc.
  • colType – the color type you need: "color", "text", etc.

Example

{{#invoke:Color|color|fighting|color}}

This will return the color code for the Fighting type.

Fallback behavior

  • If keyword or colType is not provided → returns Missing keyword or colType.
  • If Module:Color/keywords does not exist → returns Missing Module:Color/keywords.
  • If keyword does not exist → returns <keyword> (missing key in Module:Color/keywords).
  • If keyword exists but not the associated colType → returns <keyword> (missing colType <colType> in Module:Color/keywords).

Extending

  1. Add keys following the format pokehero-color-<keyword> in Module:Color/keywords.