Skip to main content

Colorpicker API overview


clear()clears the value set in the colorpicker and removes focus
destructor()releases the occupied resources
getCurrentMode()returns the current mode of displaying Colorpicker
getCustomColors()returns an array of selected custom colors
getValue()returns the code of a selected color in the Hex format
paint()repaints Colorpicker on a page
setCurrentMode()shows colopicker either in the "palette" or in the "picker" mode
setCustomColors()sets custom colors that will be displayed at the bottom of the palette
setFocus()sets focus on the specified value
setValue()selects a color in Colorpicker


applyfires on clicking the "Select" button
cancelClickfires on clicking the "Cancel" button
changefires on changing selected color in Colorpicker
modeChangefires on changing the mode of the colorpicker


cssadds custom CSS classes to Colorpicker
customColorsshows a section with custom colors in the bottom part of Colorpicker
grayShadesdefines whether the section with gray shades is displayed in the palette
modespecifies the mode of displaying a colorpicker
palettecontains arrays of colors you want to show in a colorpicker
paletteOnlydefines whether Colorpicker is shown only in the palette mode
pickerOnlydefines whether Colorpicker is shown only in the picker mode
widthsets the width of Colorpicker