You can do it manually too, HEX is just 3 base16 numbers. You split the HEX string into three pairs, turn each pair back into base10 with tonumber(number, 16) which will give you a number between 0-255
I’m not quite sure what you mean. Anyways, if you just print(h, s, v) are your values what you expect?
Maybe your problem is just that you’re using the final value for the slider color when you really should be using ColorSequenceKeypoint.new(0, Color3.fromHSV(math.clamp(h, 0, 1), math.clamp(s, 0, 1), 1))
Relatively simple, you just construct a Color3 value using the ‘fromHex’ constructor function and then construct a new Color3 value using the ‘new’ constructor function.
local function FromHsvToRgb(HSVColor : HSVColor) : Color3
return Color3.new(HSVColor.R, HSVColor.G, HSVColor.B)
end
local RGBColor = FromHsvToRgb(Color3.fromHSV(0, 0, 1)) --White.
print(RGBColor.R, RGBColor.G, RGBColor.B) --1, 1, 1 (as expected).
You technically don’t need to construct a second Color3 datatype value you can just index the first Color3 datatype value’s ‘R’, ‘G’ and ‘B’ properties to fetch the values of those channels.