Skip to main content
Also has everything from ElementHandle. Lets the user pick a color or gradient, optionally with transparency.

Two kinds of value

There are two kinds of value to think about:
  • What the user picked: the static color or gradient they chose, saved to their config. Read with Peek*, subscribe with OnChange.
  • What you should draw right now: the same color, but if they enabled an animation it changes every frame. Read with Get*, subscribe with OnUpdate.

GetColor

A single Color3 to draw right now. If they picked a gradient, you get its first color.

GetGradient

The current ColorSequence. Single colors are wrapped as a one-stop gradient.

GetTransparency

0..1. 0 if the picker doesn’t have a transparency slider.

GetRotation

Gradient rotation in degrees, including any animation.

GetSnapshot

All four at once: { color, gradient, transparency, rotation }. See ColorSnapshot.

OnUpdate

Runs every frame the displayed color changes: user picks and animation ticks. Your callback receives a snapshot.
() -> ()
Unsubscribe function.

OnChange

Runs only when the user picks a new color. Doesn’t fire on animation ticks.

OnColorChange

Same as OnChange.

OnTransparencyChange

Runs only when the user changes the transparency slider.

PeekColor

The raw color the user picked, ignoring any animation.

PeekTransparency

The transparency the user picked, or nil if the picker has no transparency slider.

SetState

Set the color or gradient (same as SetValue).

SetTransparency

0 (opaque) to 1 (invisible).

SetRotation

Rotate the gradient.

SetAnimation

Turn on an animation. Does nothing if it can’t apply (e.g. shimmer on a single color).

SetSpeed

Animation speed. 1 is normal.

Example: paint a frame

Example: only when the user picks something new