I do not recommend using the module below as it uses deprecated instances like PlayerMouse and improper gameProcessed use
For many developers, there is no way to use the built in Roblox Studio color picker for plugins and games, leaving them to make their own. And to save time, they are often very basic, leaving users and even the own developer struggling to get the right colors. So I went out of my way to make a modern, functional, and customizable circular color picker.
This plugin is completely open sourced and you may look inside the code and tweak it for your needs, and you can put it in as many games and plugins as you need. No credit is needed but it would be really nice if you do give credit
v1.0.1 - Added hexadecimal
v1.1 - Bug fixes, mobile support, and parameters/customization
v1.2 - Multiple bug fixes
local Color = require(...)
--Create new Color object using New function
local self = Color.New(gui : ScreenGui, mouse : PlayerMouse, params : table [optional])
--Change color [optional]
self:SetColor(Color3.new(0, 0, 1))
--Events (Finished, Updated, and Canceled)
self.Finished:Connect(function(color : Color3)
--Fired when player clicks the confirm button
end)
self.Updated:Connect(function(color : Color3)
--Fired every time the color changes
end)
self.Canceled:Connect(function()
--Fired when the player clicks the cancel button
end)
--Destroy if needed
self:Destroy()
The third parameter in the New function allows you to customize the UI and functionality of the color picker
Color.New(gui, mouse, {
Position: UDim2 [default is at mouse pos offseted by (16px, 16px)]
Draggable: boolean [default is true]
RoundedCorners: boolean [default is true]
PrimaryColor: Color3 [background color]
SecondaryColor: Color3 [textbox color]
TopbarColor: Color3
TextColor: Color3
})
Seems nice, consider showing a video of it in action though. I think people would prefer seeing a video showcase instead of having to download it and check it out for themselves.
Really nice looking module! Though, I do wonder if you’ve added support for hex values?
Sometimes, I use Hex values from things like paint.net when I colorpick from certain games, and say if I were to create a drawing game where I supposedly want to paste hex values from part of a color palette I eyedropped; i.e:
Would I be able to do so?
Otherwise, the RGB and HSV stuff is pretty neat.
Quick question: I used this a few days ago and noticed every time you click the button in the test place to change the frame color, it just creates a new color picker, even if you already have one open. Is this intentional?
The example or module has no check if a color picker is currently active, but you can easily make a check yourself and reset it after the canceled to finished event fires.
Hey, I noticed that when you go all the way to black in the Value bar it sets the Hue and Saturation to 0, causing the color to be monochrome, even when you move the Value bar back up.
Hey, so in the LocalScript, under self.Finished, you’re going to want to point to the part (eg. workspace.Part.Color = color) and that’s basically it, let me know if you have any problems.