Skip to content

Get Threat Status Color

Core Helper

Returns ElvUI threat color channels for a Blizzard threat status.

NamespaceEModuleCoreLifecyclestable
E:GetThreatStatusColor(status, nothreat)

Returns ElvUI threat color channels for a Blizzard threat status.

  • status: Threat status number.
  • nothreat: Optional boolean to return fallback colors for no threat.

r, g, b, a color channels.

local r, g, b = E:GetThreatStatusColor(status, true)
bar:SetStatusBarColor(r, g, b)

Good for addon bars or alerts that should visually match ElvUI threat coloring.

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