Template:SpellTypeColour

From Noita Wiki
Jump to navigation Jump to search

This template lets you look up the CSS variable containing the colour for a given spell type, which can be used to format spell backgrounds etc.

{{SpellTypeColour|Projectile}}
{{SpellTypeColour|2}}
{{SpellTypeColour|type=other}}
  • Works with names or action type enum IDs
  • Returns var(--color-spell-unknown) if nothing matches

Spell Related templates

  • {{SpellSequence}} - Render ordered spell sequences using your own templates.
  • {{SpellIcon}} - Render individual spell icons
  • Module:Wand - this lua module handles querying cargo for data, and rendering the Wand2 template.

Examples

In Out
{{SpellTypeColour|Projectile}}
var(--color-spell-projectile)
{{SpellTypeColour|Static}}
var(--color-spell-static)
{{SpellTypeColour|Modifier}}
var(--color-spell-modifier)
{{SpellTypeColour|Multicast}}
var(--color-spell-multicast)
{{SpellTypeColour|Material}}
var(--color-spell-material)
{{SpellTypeColour|Other}}
var(--color-spell-other)
{{SpellTypeColour|Utility}}
var(--color-spell-utility)
{{SpellTypeColour|Passive}}
var(--color-spell-passive)
{{SpellTypeColour|NotASpellType}}
var(--color-spell-unknown)
| 0 | Projectile | projectile = var(--color-spell-projectile)
| 1 | Static | Static Projectile | Static projectile | static projectile = var(--color-spell-static)
| 2 | Modifier | Projectile Modifier | Projectile modifier | projectile modifier = var(--color-spell-modifier)
| 3 | Multicast | multicast | Draw Many | Draw many = var(--color-spell-multicast)
| 4 | Material | material = var(--color-spell-material)
| 5 | Other | other = var(--color-spell-other)
| 6 | Utility | utility = var(--color-spell-utility)
| 7 | Passive | passive = var(--color-spell-passive)