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

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!

30 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

works perfectly but after player die, the color picker wont open anymore

1 Like

It should be fixed now. Thanks a lot for pointing that out.

This is very interesting, you can do a lot with this.