Color3.fromHSV(h, s, v)

Pretty straightforward. This would construct a Color3 from hue, saturation, and value.

3 Likes

fromHex would also be useful

1 Like
local function colorFromHex(hex)
	local r = math.floor(hex / 65536) % 256
	local g = math.floor(hex / 256) % 256
	local b = math.floor(hex % 256)
	
	return Color3.fromRGB(r, g, b)
end

print(colorFromHex(0xFFFFFE))
6 Likes

I know about that method, used it many times. It would just be nice to have it as an official function

5 Likes

Do you have a good use case for HSV by the way? I am curious why you would want this type of feature.

I want Color3.hsv and I want it to work in both directions. Input hsv to get Color3, input Color3 to get hsv.

Certain color manipulations can only be done by converting to hsv, like hue shifting. It also simplifies saturation.

3 Likes

Oh, interesting.

I have a module with these type of conversion functions if the use case is urgent.

Already added to the voting board!

1 Like

We’re suggesting a lua function, not just a studio gui.

Added the API part to the same card

7 Likes

I use hsv almost exclusively in paint programs nowadays. It’s incredibly useful and quick once you get aquainted with it. I prefer hsv over rgb any day.

While you’re at it, consider this?

Isn’t HSV selection already a thing?

2 Likes

Can’t use that in scripts doe.

4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.