Circular Color Picker - v1.2

A simple, modern and customizable circular color picker, with hexadecimal and HSV support.
This module is a complete rewrite of a previous module, now with less bloat and cleaner code.

You are free to use and modify this module for your needs, credit is appreciated.

v1.1 - Added size parameter and fixed SurfaceGui bugs
v1.2 - Added DockWidgetPluginGui support

Model: https://create.roblox.com/marketplace/asset/14664688677/Circular-Color-Picker
Demo: color_picker_demo.rbxl (80.6 KB) Don’t download module from here

local Color = require(...)

-- Create new Color object
-- Second parameter is a list of parameters, not required

local ColorPicker = Color.New(gui : ScreenGui, {
	Position : UDim2,
	RoundedCorners : boolean,
	Draggable : boolean,
	ZIndex : number,
	Size : number,
	
	Primary = {Color : Color3, Transparency : number},
	Secondary = {Color : Color3, Transparency : number},
	Topbar = {Color : Color3, Transparency : number},
	Text = {Color : Color3, Transparency : number}
} : table)

-- Change color
ColorPicker:SetColor(Color3.new(0, 0, 1))

-- Events (Finished, Updated, and Canceled)
ColorPicker.Finished:Connect(function(color : Color3)
	-- Fired when player clicks the confirm button
end)

ColorPicker.Updated:Connect(function(color : Color3)
	-- Fired every time the color changes
end)

ColorPicker.Canceled:Connect(function()
	-- Fired when the player clicks the cancel button
end)

-- Destroy if needed
ColorPicker:Destroy()
69 Likes

I still have the same issue as before with the picker being behind everything else.
Here’s a screenshot:
RobloxScreenShot20230902_203426302

5 Likes

Set the DisplayOrder of the ScreenGui you are creating the Color Picker under to a higher number then the ScreenGui(s) that are overlapping.

Edit: If they are in the same ScreenGui, then edit the module to change the main frame’s ZIndex.

6 Likes

guys i have seen this color picker before it was a free model or something that is kinda buggy so i don’t think we can do much about it since the color picker owner only knows what the script does etc because he made it himself

2 Likes

I guarantee you the random free model you found in the toolbox has nothing to do with this

6 Likes

Try using the new ZIndex parameter.

2 Likes

I have a bug where part of it is cutoff and will not appear, how would I fix this?
image

1 Like

Nevermind, it turns out my ScreenGui has to have the ZIndexBehavior set to Sibling

Amazing module, saved me from hours and hours of work and calculations!

1 Like

Would this work with my own gradient image, or does it only work with the regular image? I want to use this for a skin color changer.

How would I destroy it from another script?

The image has no effect on the color picker besides for visuals, you may change it but it has the be rotated like the original image. (red on the left going counter-clockwise)

You can store the object in a module script to be referenced in another script.

" 17:45:34.258 Face is not a valid member of Frame “Players.Scripter_Rickster.PlayerGui.VSpawnerUI.VehicleCustomization” - Client - Color:45"

This occurs whenever you attempt to create a color picker window whilst setting the “gui” parameter as a regular gui frame.

1 Like

It seems like Roblox just disagrees with making it work with plugin widget… If you make plugin core GUI still exist
A minor bug that I found is that the hex color isn’t error-proof and will error if put unpredictable value, it needs to get pcall

It looks awesome. Nice work! I’ll use it for my pyrotechnic flare system in a football game I’m working on.

can you make like an example widget that uses this plugin cause i cant seem to get it working with a plugin