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
Old post: [OLD] Circular Color Picker (v1.2)
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()