Palette

A fixed row of colour swatches, for when a full picker is overkill.

The smallest palette#

Luau
main:Palette({
    Text = "Trail colour",
    Callback = function(colour)
        trailColour = colour
    end,
})

Without Colors it uses a sensible default set.

Live preview

My Script

v1.0

Trail colour

Building it up#

Choose the swatches:

Luau
main:Palette({
    Text = "Trail colour",
    Colors = {
        Color3.fromRGB(232, 93, 93),
        Color3.fromRGB(90, 209, 122),
        Color3.fromRGB(74, 168, 240),
    },
    Default = Color3.fromRGB(90, 209, 122),
    Callback = setTrailColour,
})

Every option#

OptionTypeDefaultWhat it does
TextreqstringThe label.
Callbackfunction(Color3)Called with the chosen colour.
ColorsColor3[]The swatches to offer. Colours is accepted too.
DefaultColor3Which swatch starts selected.
DescriptionstringA quieter second line.
IconstringAn icon shown before the label.
SavestringPersist the choice under this key.

Colors or Colours

Both spellings work. The library reads Colors first and falls back to Colours, so neither is wrong.

Methods#

MethodWhat it does
Get()The selected Color3
Set(colour)Selects it and fires Callback

Palette or ColorPicker?#

Use a palette when the choices are a short, curated list — team colours, rarity tiers, a handful of highlight options. It is one click, and impossible to end up with an unreadable colour.

Use a ColorPicker when the user needs any colour in the spectrum.