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
beforeChangefires before changing selected color in Colorpicker
cancelClickfires on clicking the "Cancel" button
changefires on changing selected color in Colorpicker
modeChangefires on changing the mode of the colorpicker


cssOptional. Adds custom CSS classes to Colorpicker
customColorsOptional. Shows a section with custom colors in the bottom part of Colorpicker
grayShadesOptional. Defines whether the section with gray shades is displayed in the palette
modeOptional. Specifies the mode of displaying a colorpicker
paletteOptional. Contains arrays of colors you want to show in a colorpicker
paletteOnlyOptional. Defines whether Colorpicker is shown only in the palette mode
pickerOnlyOptional. Defines whether Colorpicker is shown only in the picker mode
transparencyOptional. Defines whether the transparency scale is displayed in the picker mode
widthOptional. Sets the width of Colorpicker