Color Picker [free and open source]

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

ColorPicker.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.

That’s about everything! I would love to hear your feedback!
have a great day and a happy newyear!

14 Likes

I tried to do this by my own and failed… I got this way too late :C
Anyways, its usefull :+1:

4 Likes

You might want to put a # in front of the hex color in the HTML bar. I did that with my game too. But other than that it’s really great. I’ve been looking for this for a few weeks now.

1 Like