Skip to content

Color Picker

Forms

A colour field: a swatch that opens the browser's colour picker, a text box that takes a hex or rgb() value, and an optional opacity slider. The value is a lowercase hex string.

atlas-color-picker

Examples

Colour field

Pick a colour from the swatch or type a hex or rgb() value; the value is lowercase hex.

Pick a color

Hex such as #0d9488, or rgb().

Value: #0d9488

With opacity

With alpha, a slider sets the opacity and translucent colours are kept as #rrggbbaa.

Pick a color

The scrim behind dialogs.

Value: #00000052

API

Generated from the library source, so it always matches the code.

AtlasColorPickerComponent atlas-color-picker

InputTypeDefaultDescription
value two-waystring'' The colour as lowercase hex (two-way bindable); '' when empty.
alpha booleanfalse Shows an opacity slider and keeps translucent values as #rrggbbaa .
placeholder string'#000000' Placeholder of the text box.
disabled booleanfalse Whether the control is disabled.
errors readonly ValidationError.WithOptionalFieldTree[][] Validation errors of the bound field. Set by Signal Forms [field] .
required booleanfalse Whether a value is required. Set by Signal Forms [field] .
invalid booleanfalse Whether the field is invalid. Set by Signal Forms [field] .
touched booleanfalse Whether the user has interacted with the field. Set by Signal Forms [field] .
readonly booleanfalse Whether the field is read-only. Set by Signal Forms [field] .
pending booleanfalse Whether async validation is running. Set by Signal Forms [field] .
name string'' Name of the field. Set by Signal Forms [field] .
ariaLabel string | nullnull Accessible name of the text box when no visible label names it (use one or the other, WCAG 2.5.3).
inputId string | undefinedundefinedid of the text box, so a visible <label atlasLabel for="…"> names it. Inside atlas-form-field the field supplies one.
ariaDescribedBy string | nullnull Extra ids for aria-describedby , merged with the surrounding form field's hint or error.
class string'' Extra CSS classes, merged with the component's own through cn() ; yours win on conflicts.
OutputPayloadDescription
touchvoid Emits when the control loses focus, so Signal Forms marks the field touched.