Wow item colors
API GetItemQualityColor | WoWWiki
August 3, 2017 – 02:58 pm
R, g, b, hex = GetItemQualityColor(quality)
- quality (number) - The numeric ID of the quality from 0 (Poor) to 7 (Heirloom).
- r (number) - The Red component of the color (0 to 1, inclusive).
- g (number) - The Green component of the color (0 to 1, inclusive).
- b (number) - The Blue component of the color (0 to 1, inclusive).
for i = 0, 8 do local r, g, b, hex = GetItemQualityColor(i) print(i, hex, _G["ITEM_QUALITY" .. i .. "_DESC"], hex:sub(5)) end
ResultWill print all qualities, in their individual colors (example result from version 6.2.4).
0 Poor ff9d9d9d 1 Common ffffffff 2 Uncommon ff1eff00 3 Rare ff0070dd 4 Epic ffa335ee 5 Legendary ffff8000 6 Artifact ffe6cc80 7 Heirloom ffe6cc80 8 WoW Token ff00ccff 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
- Patch 7.0.3 changed the Heirloom color from Heirloom ffe6cc80 to Heirloom ff00ccff. This was likely done to avoid confusion with Artifact ffe6cc80.