Thread: Quality Colors
View Single Post
10/10/14, 04:04 AM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
You can use ZO_ColorDef class:
Lua Code:
  1. local color = ZO_ColorDef:FromInterfaceColor(INTERFACE_COLOR_TYPE_ITEM_QUALITY_COLORS, _tData.quality)
  2. d(color:Colorize("whatever"))
  3. -- or
  4. d("|c" .. color:ToHex() .. "whatever|r")

or write the conversion out yourself:
Lua Code:
  1. local r, g, b = GetInterfaceColor(INTERFACE_COLOR_TYPE_ITEM_QUALITY_COLORS, _tData.quality)
  2. d(("|c%02x%02x%02x%s|r"):format(r*255, g*255, b*255, "whatever"))
  Reply With Quote