ColorPicker

A full HSV picker that drops down from the control.

The smallest picker#

Luau
main:ColorPicker({
    Text = "ESP colour",
    Callback = function(colour)
        espColour = colour
    end,
})

colour is a Color3.

Live preview

My Script

v1.0

ESP colour

Building it up#

Start on a colour:

Luau
main:ColorPicker({
    Text = "ESP colour",
    Default = Color3.fromRGB(90, 209, 122),
    Callback = setEspColour,
})

Open it immediately — useful when the picker is the whole point of the page:

Luau
main:ColorPicker({
    Text = "ESP colour",
    Default = Color3.fromRGB(90, 209, 122),
    Open = true,
    Callback = setEspColour,
})

Every option#

OptionTypeDefaultWhat it does
TextreqstringThe label.
Callbackfunction(Color3)Called as the colour changes.
DefaultColor3Starting colour.
OpenbooleanfalseStart with the picker expanded.
DescriptionstringA quieter second line.
IconstringAn icon shown before the label.
SavestringPersist the colour under this key.

Methods#

MethodWhat it does
Get()The current Color3
Set(colour)Sets it and fires Callback
Open() / Close() / IsOpen()Controls the drop-down

Colours are Color3#

Roblox has two constructors and they are not interchangeable:

Luau
Color3.fromRGB(255, 122, 47)   -- 0-255, what you read off a colour picker
Color3.new(1, 0.48, 0.18)      -- 0-1 floats

Use fromRGB unless you have a reason not to — every hex colour converts to it directly.

Fewer choices is often better

If you only need a handful of colours, a Palette is faster to use and impossible to get wrong. Reach for a full picker when the user needs any colour at all.