Convert hexadecimal rgb to esoui SetColor(r,g,b,a)
Hi there,
thought its easy but its not :( How can I convert hex rgb CFDCBD to what ever system eso uses in SetColor. I know values from 0 to 1... Is there a calculator? Thanks ! :) |
got it:
-- declare your color once in your initialization code local MINT_GREEN = ZO_ColorDef:New("c8ffd2") -- assign it to the control whenever you need it Nyght_Status_Window_StatusBar:SetColor(MINT_GREEN:UnpackRGBA()) |
There are also now a bunch of utility functions on ZO_ColorDef that allow you to convert from format to format. For instance:
Code:
local r, g, b, a = ZO_ColorDef.HexToRGBA("c8ffd2") |
Just in case you guys need to find the other exisitng ZO_ColorDef functions, they are located here:
/esoui/libraries/utility/zo_colordef.lua ~around lines 66ff Current version of the file: https://github.com/esoui/esoui/blob/...lordef.lua#L66 Lua Code:
|
All times are GMT -6. The time now is 05:21 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI