beforeChange
fires before changing selected color in Colorpicker
beforeChange: (color: string) => boolean | void;
Parameters:
color: string
- the newly selected color
Returns:
Return false
to prevent changing the color; otherwise, true
.
Example
colorpicker.events.on("beforeChange", function(color){
// your logic here
return false;
});
Related sample: Colorpicker. Events
Change log:
added in v8.0