Hello Developers,
I’ve recently created a color picker for my 2D Perlin Noise Visualizer, and rather than letting it collect dust, I’m making it open source!
It is really simple to use there are a few examples in the video.
here is the model.
Documentation
Constructor
ColorPickerModule.new(): ColorPicker
Constructor for creating a new ColorPicker object.
Events
ColorPicker.Opened
Fires when the color picker is opened.
ColorPicker.Closed
Fires when the color picker is closed.
Parameters
-
selectedColor
(Color3): The color selected when the color picker is closed. -
confirmed
(boolean?):-
true
when closed with the ‘OK’ button. -
false
when closed with the ‘Cancel’ button. -
nil
when closed using the:Close()
method.
-
ColorPicker.Changed
Fires when the color selection changes.
Parameters
-
updatedColor
(Color3): The updated color during color selection.
Methods
ColorPicker:Start()
Opens the color picker.
ColorPicker:Cancel()
Cancels the color selection and closes the color picker.
ColorPicker:SetColor(color: Color3)
Sets the color of the color picker.
ColorPicker:GetColor(): Color3
Returns the current color of the color picker.
ColorPicker:Destroy()
Destroys the color picker.
Feel free to use this color picker however you want. Use it into your projects, sell it, modify it, or use the code as a learning resource!
If you use it in your project, I’d love to hear about it, so feel free to message me!
That’s about everything! I would love to hear your feedback!