GetClassColor()

From Warcraft Wiki
Jump to navigation Jump to search
This function is implemented in FrameXML/Util.lua.

Returns the color value associated with a given class.

rPerc, gPerc, bPerc, argbHex = GetClassColor(englishClass)

Arguments

englishClass
String - the localization-independent name of the class, e.g., 'WARLOCK'. See ClassId for the list of acceptable arguments.

Returns

rPerc, gPerc, bPerc : Number - the value, between 0 and 1, associated with the red, green, and blue - respectively - coordinate in the RGB space.
argbHex
String - the ARGB hex code of the color, e.g., 'ff8788ee' for 'WARLOCK'.

Details

  • The first three return values have two decimal places precision.
  • Any argument different than a valid englishClass will return information about the color white, i.e., 1, 1, 1, 'ffffffff'.