Color Picker

ColorPicker is a color selector supporting multiple color formats.

Basic usage

ColorPicker requires a string typed variable to be bound to v-model.

Alpha

ColorPicker supports alpha channel selecting. To activate alpha selecting, just add the show-alpha attribute.

Predefined colors

ColorPicker supports predefined color options

Sizes

Attributes

NameDescriptionTypeAccepted ValuesDefault
model-value / v-modelbinding valuestring
disabledwhether to disable the ColorPickerbooleanfalse
sizesize of ColorPickerstringlarge / default / small
largesize largebooleanfalse
smallsize smallbooleanfalse
show-alphawhether to display the alpha sliderbooleanfalse
color-formatcolor format of v-modelstringhsl / hsv / hex / rgbhex (when show-alpha is false)/ rgb (when show-alpha is true)
popper-classcustom class name for ColorPicker's dropdownstring
predefinepredefined color optionsarray
validate-eventwhether to trigger form validationboolean-true

Events

NameDescriptionParameters
changetriggers when input value changescolor value
active-changetriggers when the current active color changesactive color value
Last Updated:
Contributors: Tam Mai