Module:Utilities/doc: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
cleanup, relink
Sur (talk | contribs)
m remove_trailing_colon example
Line 15: Line 15:
===Examples===
===Examples===
See examples at [[Template:Color]]
See examples at [[Template:Color]]
==remove_trailing_colon==
Remove's the ":" character from the end of a string
===Examples===
<pre>{{#invoke:Utilities|remove_trailing_colon|A Fate's Tale:}}</pre>
{{#invoke:Utilities|remove_trailing_colon|A Fate's Tale:}}

Revision as of 17:01, 4 April 2025

Overview

Utility functions that serve any miscellaneous purpose

Functions

get_slot_color

Retrieve's the color of a certain slot/category in any color format (default hex), formerly known in english as Weapon, Vitality, and Spirit, though their unlocalized names are Weapon, Armor, and Tech. Utilized by Template:Color

Parameters

  • slot - slot key, options are Weapon, Armor, and Tech
  • color_format - color format - Defaults to hex. Valid options are hex, rgb, hsl, cmyk
  • no_wrap - (OPTIONAL) - Defaults to false. Set to true to remove prefixes and postfixes of '#' from hex, or 'rgb()', 'hsl()', and 'cmyk()' from the other formats. May be useful for altering the values dynamically
  • debug_mode - (OPTIONAL) - Defaults to false. Used mostly for documentation purposes

Examples

See examples at Template:Color

remove_trailing_colon

Remove's the ":" character from the end of a string

Examples

{{#invoke:Utilities|remove_trailing_colon|A Fate's Tale:}}

A Fate's Tale