ESO "RGB" is between 0 and 1, not 0 and 255:
Code:
-- Convert FFFFFF to 1, 1, 1
function Hex2RGB(hex)
hex = hex:gsub("#", "")
return tonumber("0x" .. hex:sub(1, 2)) / 255, tonumber("0x" .. hex:sub(3, 4)) / 255, tonumber("0x" .. hex:sub(5, 6)) / 255
end
-- Convert 1, 1, 1 to FFFFFF
function RGB2Hex(r, g, b)
return string.format("%.2x%.2x%.2x", zo_round(r * 255), zo_round(g * 255), zo_round(b * 255))
end