ColorPicker
A full HSV picker that drops down from the control.
The smallest picker#
main:ColorPicker({
Text = "ESP colour",
Callback = function(colour)
espColour = colour
end,
})colour is a Color3.
Preview
My Script
v1.0
Search…
Ember v1ESP colour
Building it up#
Start on a colour:
main:ColorPicker({
Text = "ESP colour",
Default = Color3.fromRGB(90, 209, 122),
Callback = setEspColour,
})Open it immediately. Useful when the picker is the main thing on the page:
main:ColorPicker({
Text = "ESP colour",
Default = Color3.fromRGB(90, 209, 122),
Open = true,
Callback = setEspColour,
})Apply the starting colour to your systems. A saved picker already calls
Callback with the colour it restored, covered in
Saving settings. FireOnStart does the
same when nothing was saved:
main:ColorPicker({
Text = "ESP colour",
Default = Color3.fromRGB(90, 209, 122),
Save = "espColour",
FireOnStart = true,
Callback = setEspColour,
})Every option#
| Option | Type | Default | What it does |
|---|---|---|---|
Textreq | string | — | The label. |
Callback | function(Color3) | — | Called as the colour changes, coalesced to one call per frame while dragging. |
Default | Color3 | table | — | Starting colour when nothing is saved. A { r = , g = , b = } table of 0-1 numbers works too. That is the saved form. |
Open | boolean | false | Start with the picker expanded. |
FireOnStart | boolean | false | Call Callback once with the initial colour after the control builds. |
Description | string | — | A quieter second line. |
Icon | string | — | An icon shown before the label. |
Save | string | boolean | — | Persist the colour under this key. true derives one from the section and label. |
Tooltip | string | — | Shown while the pointer is over the control. |
Disabled | boolean | false | Refuses input and dims the control. |
DisabledReason | string | — | Shown as a tooltip while it is disabled. |
Methods#
| Method | Returns | What it does |
|---|---|---|
Get() | Color3 | The current colour |
Set(colour) | true, or false, reason | Sets it and fires Callback. Takes a Color3 or a { r, g, b } table. |
Open() / Close() / IsOpen() | boolean from IsOpen | Controls the drop-down panel |
Typing a hex value#
The closed control shows the current colour as #RRGGBB. The open panel has a
field under the hue strip that takes the same form. Type six hex digits, with or
without the #; it commits when the field loses focus. Anything else puts the
previous colour back.
For a short fixed list of colours, use a Palette instead.