Returns RGB color codes for an item quality.
r, g, b, hex = GetItemQualityColor(quality)
- Integer - The numeric ID of the quality from 0 (Poor) to 7 (Heirloom).
- r, g, b, hex
- Float - The Red component of the color
- Float - The Green component of the color
- Float - The Blue component of the color
- String - Contains the hexidecimal representation of the string, as well as "|c" in the beginning.
for i = 0, 7 do local r, g, b, hex = GetItemQualityColor(i); print(i, hex, getglobal("ITEM_QUALITY" .. i .. "_DESC"), string.sub(hex,5)); end
- Will print all qualities, in their individual colors (example result from version 3.1.1).
- GetItemQualityColor() was added in 1.9.1
- If an invalid quality index is specified, GetItemQualityColor() returns white (same as index 1):
- r = 1
- g = 1
- b = 1
- hex = |cffffffff
- Quality #7 was added in version 3.0 for heirloom items.
- ITEM_QUALITY7_DESC is now defined as of 3.1.1.