Color Picker

The ArcadiaColorPicker component provides a set of color swatches and an optional hex text input for selecting colors.

Basic Usage

<ArcadiaColorPicker @bind-Value="selectedColor" />

<ArcadiaColorPicker @bind-Value="color" ShowInput="false" />

<ArcadiaColorPicker @bind-Value="color"
                    Presets="@(new[] { "#ff0000", "#00ff00", "#0000ff" })" />

Parameters

ParameterTypeDefaultDescription
Valuestring?nullThe selected hex color value (e.g., "#8b5cf6"). Supports two-way binding.
Presetsstring[]?nullOptional preset color swatches. A default 12-color palette is used if null or empty.
ShowInputbooltrueWhether the hex text input is shown.
DisabledboolfalseWhether the color picker is disabled.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

Events

EventTypeDescription
ValueChangedEventCallback<string>Fired when the selected color changes.

Accessibility

  • Swatch buttons use role="radio" inside a role="radiogroup" with aria-label="Color presets".
  • Each swatch has aria-checked and aria-label indicating the color value.
  • The hex input uses aria-label="Hex color value".
  • Disabled state is reflected on all interactive elements.