View Single Post
06/20/14, 12:27 AM   #4
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Originally Posted by SkOODaT View Post
is thier any way by chance to use :ToHex() with something like GetUnitReactionColor("reticleover")
...
local colorDef = GetUnitReactionColor("reticleover")
local hexString = colorDef:ToHex()
GetUnitReactionColor("reticleover") returns r, g, and b values

You could use them to create your own ZO_ColorDef object and then use it that way.

Zgoo dump of the ZO_ColorDef object:
Warning: Spoiler


To create a new ColorDef, you can use:
Lua Code:
  1. local myColor = ZO_ColorDef:New(red, green, blue, alpha)

Any you leave out will default to 1.
Since GetUnitReactionColor returns r,g,b you can do the following:

Lua Code:
  1. local colorDef = ZO_ColorDef:New(GetUnitReactionColor("reticleover"))
  2. local hexString = colorDef:ToHex()
  Reply With Quote