WoW:API GetItemQualityColor: Difference between revisions
Jump to navigation
Jump to search
GetItemQualityColor -Documentation by Maldivia-
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{wowapi}}__NOTOC__ | |||
<center>'''GetItemQualityColor''' ''-Documentation by Maldivia-''</center> | <center>'''GetItemQualityColor''' ''-Documentation by Maldivia-''</center> | ||
Line 29: | Line 30: | ||
==Details== | ==Details== | ||
: Added in 1.9.1 | : Added in 1.9.1 | ||
Revision as of 12:00, 20 December 2006
← WoW API < GetItemQualityColor
Returns RGB color codes for an item quality.
r, g, b, hex = GetItemQualityColor(quality)
Parameters
Arguments
- quality
- quality
- Integer - The numeric ID of the quality from 0 (Poor) to 6 (Artifact).
Returns
- r, g, b, hex
- r
- Float - The Red component of the color
- g
- Float - The Green component of the color
- b
- Float - The Blue component of the color
- hex
- String - Contains the hexidecimal representation of the string, as well as "|c" in the beginning.
Example
for i = 0, 6 do local r, g, b, hex = GetItemQualityColor(i); DEFAULT_CHAT_FRAME:AddMessage(getglobal("ITEM_QUALITY" .. i .. "_DESC"), r, g, b); end
Result
- Will write all qualities to the default chat frame, in their individual colors.
Details
- Added in 1.9.1