How To Select The Saturation Of A Color3

Questions That U May Ask:

  1. What do you want to achieve? How To Select The Saturation Of A Color3 And Change The Saturation Of The Color

  2. What is the issue? I Have No Idea Of How To Make That

  3. What solutions have you tried so far? I Tried Using Strings But Didnt Worked,I Tried Look To Some Posts But Nothing,i Also Tried Using Strings Splits On ToHSV() But For Some Reason It Only Returns One Value

Btw This its my first Post,If Something Its Not Right Then Please Say To Me

I recommend looking at this page to answer your question:
Color3 | Roblox Creator Documentation

Specifically the Color3 method :ToHSV

Edit: I see you’ve tried this, not sure why you would try to split the output though. Here’s an example from the page:

local red = Color3.fromRGB(255, 0, 0)

local redH, redS, redV = red:ToHSV()
print(redH, redS, redV)  --> 1 1 1

In this case, the redS variable would be the saturation. Then to update the saturation I would do this:

local red = Color3.fromRGB(255, 0, 0) -- base color

local redH, redS, redV = red:ToHSV() -- retrieving saturation
local newRedS = redS - .1 --Just reducing the saturation by .1
local newRedColor3 = Color3.fromHSV(redH, newRedS, redV) -- the new color with reduced saturation

Try to do something about it as I didn’t understand the main purpose of your script.
Example:

local h, s, v = Color3.fromRGB(74, 199, 36):ToHSV()
local color = Color3.fromHSV(h, s, v) --where s - saturation

Docs: Color3 | Roblox Creator Documentation

Oh I Didnt Know That U Can Use Multiples Locals To Represent 3 Different Numbers!
Thanks For The Help!

1 Like

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