View Single Post
08/01/14, 04:52 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
AFAIK color code can't have transparency. All you can do is as merlight suggested use myLabel:SetAlpha(0.5).

As for the hexadecimal color code - default ZO_ColorDef object works with ARGB, i.e.:
7FFF0000

Lua Code:
  1. local myColor = ZO_ColorDef:New("7FFF0000")
  2.  
  3. myText = myColor:Colorize("Hello World!")
  4. myLabel:SetColor(myColor:UnpackRGBA())

But still as I said above, transparency in the color code will be ignored, value of myText will be "|cFF0000Hello World!|r".
  Reply With Quote