Colorpicker API overview
Methods
Name | Description |
---|---|
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 |
Events
Name | Description |
---|---|
apply | fires on clicking the "Select" button |
beforeChange | fires before changing selected color in Colorpicker |
cancelClick | fires on clicking the "Cancel" button |
change | fires on changing selected color in Colorpicker |
modeChange | fires on changing the mode of the colorpicker |
Properties
Name | Description |
---|---|
css | Optional. Adds custom CSS classes to Colorpicker |
customColors | Optional. Shows a section with custom colors in the bottom part of Colorpicker |
grayShades | Optional. Defines whether the section with gray shades is displayed in the palette |
mode | Optional. Specifies the mode of displaying a colorpicker |
palette | Optional. Contains arrays of colors you want to show in a colorpicker |
paletteOnly | Optional. Defines whether Colorpicker is shown only in the palette mode |
pickerOnly | Optional. Defines whether Colorpicker is shown only in the picker mode |
transparency | Optional. Defines whether the transparency scale is displayed in the picker mode |
width | Optional. Sets the width of Colorpicker |