Editing Module:Utilities/docGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
=Overview= | |||
Utility functions that serve any miscellaneous purpose | Utility functions that serve any miscellaneous purpose | ||
=Functions= | |||
==get_slot_color== | ==get_slot_color== | ||
Retrieve's the color of a certain slot/category | Retrieve's the hex color of a certain slot/category, formerly known in english as Weapon, Vitality, and Spirit, though their unlocalized names are Weapon, Armor, and Tech. | ||
===Parameters=== | ===Parameters=== | ||
* '''slot''' - slot key, options are Weapon, Armor, and Tech | * '''slot''' - slot key, options are Weapon, Armor, and Tech | ||
* '''color_format''' - color format | * '''color_format''' - color format, defaults to hex. Valid options are hex, rgb | ||
===Examples=== | ===Examples=== | ||
To style text: | |||
<code><nowiki>'''Tech Item:''' <span style="color: {{#invoke:Utilities|get_slot_color|Tech}};">Powered Up!</span></nowiki></code> | |||
= | '''Tech Item:''' <span style="color: {{#invoke:Utilities|get_slot_color|Tech}};">Powered Up!</span> | ||
To style divs: | |||
<code><nowiki><div style="background-color: {{#invoke:Utilities|get_slot_color|Tech}}; padding: 10px; border-radius: 5px;"> | |||
This is a Tech item description. | |||
</div></nowiki></code> | |||
{{#invoke:Utilities| | <div style="background-color: {{#invoke:Utilities|get_slot_color|Tech}}; padding: 10px; border-radius: 5px;"> | ||
This is a Tech item description. | |||
</div> | |||