Returns color values for use in displaying items of a given quality. Color components are floating-point values between 0 (no component) and 1 (full intensity of the component).

Prior to 4.2 the hexColor return was prefixed with |c now it is just the hex codes for the color.

See also Item functions.


redComponent, greenComponent, blueComponent, hexColor = GetItemQualityColor(quality)


  • quality - An numeric item quality (rarity) value (number, itemQuality)


  • redComponent - Red component of the color (number)
  • greenComponent - Green component of the color (number)
  • blueComponent - Blue component of the color (number)
  • hexColor - Color value of a colorString for formatting text with the color (string)


-- returns (approximately) 0.6392, 0.2078, 0,9333, "ffa335ee"