View Single Post
03/30/22, 02:45 PM   #6
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 660
of a selected colour on the colour wheel and can be adjusted to refine the colour as it's not easy to get a pixel-perfect choice using a mouse cursor to select from the palette. All that needs to happen from there is that the resulting value be put into the field in the addon setting that is currently being colourised
For text color yes it is '|cFFFFFF' .. text .. '|r' to make the text white. However, that's for text when you display it to chat or to mail for example.

Otherwise the color is not stored that way in saved variables. That uses 0 to 1. Unless you want to convert it with something else. 0 is black and 1 is white. The docs at the link you posted will mention ZO_ColorDef:SetRGBA(r, g, b, a) but that is because the values are keyed. Meaning { r = 0, g = 0.5, b = 1, a = 1 } and when you pass that to the function then it knows what to do.

Code:
["QuestMap_daily"] = 
{
    [r] = 0.1725490242,
    [g] = 0.9333333373,
    [b] = 0.1725490242,
    [a] = 1,
},
So while your request is simple and yes someone could probably make it use Hex instead of 0 to 255, in the end the color picker saves it in the proper ZOS format which is 0 to 1. Someone could make the UI to use Hex rather then decimal but we can't change the ZOS standard of 0 to 1.

Which is why it's better to say, "Okay thanks for the information I will use the web links it's just a pain. Thanks guys." Because in the end it is easy enough to use web links, convert the hex to decimal, and put it in. Then accept that if you put in 254, 153, 15 that because that is converted to 0 to 1, the math may not work out to be the same the next time you look at the color. So you may see it come out to be 253, 152, 14 and that's just how it is.

Last edited by Sharlikran : 03/31/22 at 03:45 PM.
  Reply With Quote