ColorPicker
@rockshin/tao-uiChoose solid or gradient colors with precise Color objects, presets and format conversion.
The added API follows Ant Design 6.7.0; appearance, theming and Semantic DOM use tao-ui. Existing component APIs remain unchanged.
Examples
Controlled color
Keep the Color object returned by onChange to retain precision while editing.
#008888
Three sizes
Sizes follow the compatible API: small, middle and large.
Gradients and stops
Add, remove and move stops, or switch between solid and gradient modes.
Grouped presets
Group colors by use; presets can also contain gradients.
HEX, RGB and HSB
Switch representations in the panel or lock the required format.
Alpha and clear
disabledAlpha emits opaque colors; allowClear provides a transparent value.
Commit after editing
Use onChangeComplete to commit a completed drag or edit.
Committed: #008888
Custom panel
Compose Picker and Presets while retaining picker state and events.
Triggers and disabled state
Use a custom button, hover activation or a disabled picker.
Phone palette
The independent phone viewport constrains the panel and inherits the theme.