How do i use this color selector?

hi

How would I use this? It’s made by @dispeller and I think it would work pretty well for what I need it for.

I read through the script and as a new/basic scripter it confused me lol. Is there a variable that I can use? And, what type of color is it? RGB, HSV? or anything else

Sorry for being stupid lol >-<

It’s probably RGB, and they are using

ColorSequence.new({ -- color sequence
   		ColorSequenceKeypoint.new(0,Color3.fromRGB(0,0,0)),--black
   		ColorSequenceKeypoint.new(1, Color3.fromRGB(255,255,255))--white
   	}
   	)
-- this would be a gradient from Black to White
1 Like

In Roblox, Color3 is based on RGB

The easiest way to use this is by using the provided Gui and checking ColorPickerUi.ColorPickerFrame.ColorShower.BackgroundColor3

You can move/scale the ui however you want, just keep the ancestry the same.

You can also edit the UiGradient’s color sequence to change the gradient.
The script will automatically detect any UiGradients under the ColorPickerArea frame, so don’t worry about names there. There’s a folder of example gradients named “ExampleGradients” if you’re too lazy to edit your own. You can swap the Rainbow gradient for one of those if you want.

If you want to use the module, you’d just feed it a decimal between 0 to 1 and a ColorKeyPoints.
You can get a ColorKeyPoints by getting UiGradient.Color.KeyPoints.

getColor(0.5, UiGradient.Color.KeyPoints) 
-- Returns the Color3 (RBG) of the gradient's center

Alright, thanks for your input! :smile:

Is there a way to get the color into a Color3Value?
I tried

script.Parent.Parent.ColorPickerFrame.ColorShower:GetPropertyChangedSignal("BackgroundColor3"):Connect(function()
	script.Parent.Value = script.Parent.LightController.ColorPickerFrame.ColorShower.BackgroundColor3
end)

but it didnt work

That should work.
BackgroundColor3 is a Color3 value.

Can you give me a model of what you have?

I have no scripts yet other than that one and the scripts inside of the model you made.
image
The local script inside of COLORVALUE is the one I just sent.

But the model is here
colorchanger.rbxm (7.5 KB)

it’s working fine for me
the Color3Value is changing according to the BackgroundColor3

That’s weird, let me add a few print() thingys to try and debug it.


:thinking:

using script.Parent isn’t very good practice
try this code


local ValueObj = script.Parent
local LightControllreFrame = ValueObj.Parent
local ColorPickerFrame = LightControllreFrame.ColorPickerFrame
local ColorShower = ColorPickerFrame.ColorShower

ColorShower:GetPropertyChangedSignal("BackgroundColor3"):Connect(function()
	ValueObj.Value = ColorShower.BackgroundColor3
end)

also, are you sure you don’t have anything overwriting it?

That code didn’t work either.

I don’t think I have anything overwriting it, let me open a baseplate and test it there.

It didn’t work in a baseplate either.

It’s probably an issue on my end,

untitled.rbxm (8.1 KB)

this is what I have

Hello again.

Still did not work. Why would it not be working for me?