ColorPicker

Pick a colour with an area, a hue slider, a hex field and presets — in a popover, inline, or as a hex text field with a colour dot.

Features7APIThemingAccessibility

Basic

A button with the colour; the popover holds the area, the hue slider and the hex field.

Value: #2563eb

Inline

inline shows the panel in place.

Field

field turns the picker into a text field with a colour dot: type a hex like #3c6 or open the picker from the dot. On blur a valid colour becomes #rrggbb; anything else keeps the field invalid.

Buttons and links use this colour

Presets

Preset swatches for the colours your product uses, and a clear button.

Value: none

Formats

format sets the type of the value: hex text, an RGB or an HSB object.

{ "r": 236, "g": 72, "b": 153 }{ "h": 200, "s": 80, "b": 90 }

States

Sizes, invalid, disabled and read-only.

Design tokens

dt changes the colorPicker tokens of one picker.