ColorPicker is a color picker component that is used to solve the need to select a color in certain scenes.
ColorPicker is a color selector supporting multiple color formats.
### Color
### Basic usage
:::demo ColorPicker usage is similar to DatePicker and requires v-model to bind a variable in a Vue instance. The bind variable's data type needs to be a string.
:::demo ColorPicker requires a string typed variable to be bound to v-model.
@@ -67,25 +46,17 @@ ColorPicker is a color picker component that is used to solve the need to select
```
:::
### Color and alpha
### Alpha
:::demo ColorPicker supports normal colors, also supports alpha-channel colors, through the show-alpha attribute to control whether to support the use of transparency.
:::demo ColorPicker supports alpha channel selecting. To activate alpha selecting, just add the `show-alpha` attribute.
| show-alpha | Whether to display the alpha slider. | Boolean | — | false |
| color-format | Write the v-model's color format. In the case of show-alpha is true, the default value is rgb, otherwise hex. | string | hsl, hsv, hex, rgb | hex |
\ No newline at end of file
| show-alpha | whether to display the alpha slider | boolean | — | false |
| color-format | color format of v-model | string | hsl / hsv / hex / rgb | hex (when show-alpha is false)/ rgb (when show-alpha is true) |