Skip to content

Inverse Class Color

Core Helper

Builds a readable inverse color from the current class color.

NamespaceEModuleCoreLifecyclestable
E:InverseClassColor(class, usePriestColor, forceCap)

Builds a readable inverse color from the current class color.

  • class: Uppercase class token.
  • usePriestColor: Optional class-color handling flag.
  • forceCap: Optional boolean to cap inverse channels for readability.

Color table containing inverse r, g, b values plus colorStr.

local inverse = E:InverseClassColor("PRIEST", true)
button.Label:SetTextColor(inverse.r, inverse.g, inverse.b)

Good for text or border contrast when the base class color is used as a fill.

Source: ElvUI/Game/Shared/General/API.lua:300