Documentation

Asgard

Getting started

Theming

Guides

Layout

Docking

Inputs & forms

Button

Switch

Checkbox

Radio

Select

Slider

TextBox

Upload

ImageCropper

Pickers

Color picker

Calendar

Time picker

DateTime input

Data display

Card

Accordion

Typography

Progress

DataTable

TreeView

SyntaxColor

MarkdownRenderer

Terminal

Layout & docking

Grid

Splitter

SDiv

Dock

Theme switcher

Media query

Feedback & overlays

Alert

Toast

Tooltip

Popups

Drawer

FloatingPanel

FloatingWindow

Navigation & chrome

Breadcrumb

Stepper

Toolbar

Ribbon

ContextMenu

FeatureTour

Documentation

Asgard

Getting started

Theming

Guides

Layout

Docking

Inputs & forms

Button

Switch

Checkbox

Radio

Select

Slider

TextBox

Upload

ImageCropper

Pickers

Color picker

Calendar

Time picker

DateTime input

Data display

Card

Accordion

Typography

Progress

DataTable

TreeView

SyntaxColor

MarkdownRenderer

Terminal

Layout & docking

Grid

Splitter

SDiv

Dock

Theme switcher

Media query

Feedback & overlays

Alert

Toast

Tooltip

Popups

Drawer

FloatingPanel

FloatingWindow

Navigation & chrome

Breadcrumb

Stepper

Toolbar

Ribbon

ContextMenu

FeatureTour

Pickers

Choose a color, compact or full.

ColorPicker is a comprehensive color selection component with canvas picker, hue/alpha sliders, and swatch palettes.

Key features:

  • Three modes: simple (swatches), classic (canvas + sliders), advanced (harmony + contrast)
  • Format switching between HEX, RGB, and HSL
  • Eyedropper tool, recent colors, and custom swatches
  • ColorButton companion for toolbar/form integration
Loading preview…
When to use it
  • A full color editor (inline ColorPicker): theme / brand / drawing tools
  • An accent color in a settings row (ColorButton swatch + popover)
  • Eyedropper sampling and recent-color history
  • Color harmony suggestions (advanced mode)
Properties
PropTypeDefaultDescription
valueColorThe currently selected color as an internal HSLA Color type.
onChange(color: Color) => voidCallback fired when the selected color changes. The handler receives the new value directly, NOT a DOM event (write onChange={(v) => setX(v)}, not e.target.value).
mode'simple' | 'classic' | 'advanced''classic'Controls the complexity of the picker UI. Simple shows swatches only; classic adds canvas and sliders; advanced adds harmony and contrast tools.
format'hex' | 'rgb' | 'hsl''hex'The color format used for the text input display.
showAlphabooleantrueWhether to show the alpha/opacity slider.
showSwatchesbooleantrueWhether to display the color swatch palette.
showEyedropperbooleantrueWhether to show the eyedropper tool button for picking colors from the screen.
showHarmonybooleanfalseWhen true, displays color harmony suggestions (complementary, triadic, etc.).
Notes
  • The Color type is an internal HSLA representation; use the provided utility functions to convert to/from hex and RGB.
  • In advanced mode, harmony and contrast checker tools help ensure accessible color combinations.
  • Recently selected colors are automatically persisted to localStorage and displayed in a recent colors row.
Presets