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.:
7F
FF0000
Lua Code:
local myColor = ZO_ColorDef:New("7FFF0000")
myText = myColor:Colorize("Hello World!")
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".