API GetClassColor

From Wowpedia
Jump to: navigation, search
"I" iconThis function is implemented by FrameXML in Util.lua.

Returns the color value associated with a given class.

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


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


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


  • 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'.