## ColorPicker
ColorPicker 是一个颜色选择器,该组件是用来解决某些场景下需要选择颜色的需求。
### 选择颜色
:::demo ColorPicker 用法与 DatePicker 类似,需要使用 v-model 来与 Vue 实例中的一个变量进行双向绑定,绑定的变量需要是字符串类型。
```html
有默认值
无默认值
```
:::
### 选择颜色和透明度
:::demo ColorPicker 支持普通颜色,也支持带 Alpha 通道的颜色,通过 show-alpha 属性即可控制是否支持透明度的使用。
```html
有默认值
无默认值
```
:::
### Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------- |---------- |------------- |-------- |
| show-alpha | 是否显示透明度 Slider。 | Boolean | — | false |
| color-format | 写入 v-model 的颜色的格式。在 show-alpha 为 true 的情况下,默认值为 rgb,否则为 hex。 | string | hsl, hsv, hex, rgb | hex |