<!-- Generated by npm run gen:skill from ui/ColorPicker/skill.md - do not edit. -->

# ColorPicker

## `<colorpicker>`

- `mode`: popup | inline
- `dark`: auto | true | false
- `alpha`, `none`, `value`, `contrast` (#rrggbb, #rgb, or a theme color name)
- events: Change, Select
- methods: setContrastColor, setDark

```xml
<panel type="rows" width="240" height="240" padding="10">
  <colorpicker name="basic" mode="inline" width="220" height="220" value="#4f46e5"/>
</panel>
```

## Guidance

- Bind it to the color's node: it stores `#rrggbbaa` (`transparent` with `none="true"`); `alpha="true"` adds opacity.
- Change fires during a drag (at most every 50ms), Select once per finished gesture: act on Select. Neither fires for setValue or a document update.
- `contrast="#151a22"` draws the WCAG 3:1 and 4.5:1 lines against that backdrop; setContrastColor changes it at run time.
- The chrome is fixed light or dark, not themed: `dark="auto"` follows the parent's background; pin it on mid-tones.
