local test = {1,1,1}
print(tostring(Color3.fromHSV(unpack(test))))
This prints
1, 0, 0
Why is that? It used to work fine before
local test = {1,1,1}
print(tostring(Color3.fromHSV(unpack(test))))
This prints
1, 0, 0
Why is that? It used to work fine before
fromHSV doesn’t create a special Color3 datatype. So you are printing the rgb values of the color3.
You can use the :ToHSV method on Color3 to print the hsv values instead.
I’m trying to take HSV values from a table and turn them into a Color3 value, how do I do this properly?
local HSV = {0.5,0.5,0.5}
Decal.Color3 = HSV????
Color3.fromHSV(table.unpack(HSV))
Yeah, this doesn’t work properly for some reason
local HSV = {1,1,1}
local Color = Color3.fromHSV(table.unpack(HSV))
print(Color)
It ends up printing
1, 0, 0
That is expected behavior. The __tostring metamethod of the Color3 returns a string of the RGB (not HSV) components together.
Just use Color:ToHSV() to get all 3 HSV (not RGB) components
Ah, sorry, I forgot how HSV and RGB are supposed to work, everything is fine