Lore archive · Warcraft Wiki, 2023 dump
API GetItemQualityColor
Last wiki revision 2022-12-13
Returns the color for an item quality. r, g, b, hex = GetItemQualityColor(quality)
- quality:
- r: - Red component of the color (0 to 1, inclusive).
- g: - Green component of the color (0 to 1, inclusive).
- b: - Blue component of the color (0 to 1, inclusive).
- hex: - UI escape sequence for this color, without the leading "|c".
- It is recommended to use the global ITEM_QUALITY_COLORS table instead of repeatedly calling this function.
- In particular, already includes the leading "|c" escape sequence whereas the fourth return value of this function does not.
- If an invalid quality index is specified, GetItemQualityColor returns white (same as index 1):
- r = 1
- g = 1
- b = 1
- hex = |cffffffff
- Will print all qualities, in their individual colors.
0 Poor 9d9d9d 1 Common ffffff 2 Uncommon 1eff00 3 Rare 0070dd 4 Epic a335ee 5 Legendary ff8000 6 Artifact e6cc80 7 Heirloom 00ccff 8 WoW Token 00ccff
Source
https://warcraft.wiki.gg/wiki/API_GetItemQualityColor · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.