ColorPickerModel

Interface representing the ColorPicker class.

Properties

columns Number

Specifies the number of columns to user when rendering the palette.

Default: 10

createPopupOnClick Boolean

Specifies whether to create the popup element when the color picker is opened.

Default: false

cssClass String

Specifies CSS classes to customize the appearance of the control.

Default: ""

disabled Boolean

Specifies whether to enable or disable the control.

Default: false

enableOpacity Boolean

Specifies whether to enable or disable the opacity option in the color picker.

Default: true

enableRtl Boolean

Specifies whether to render the control in right to left direction.

Default: false

enableState Boolean

Specifies whether to persist the state of the control between page loads.

The following properties will be saved to state.
  • value

Default: false

inline Boolean

Specifies whether to show the color picker as inline.

Default: ""

locale String

Specifies the culture and localization value for this control, overriding the globally defined value.

Default: en-US

mode ColorPickerMode

Specifies the color picker mode.

Default: Picker

modeSwitcher Boolean

Specifies whether to display the mode switcher or not to toggle between picker or palette.

Default: true

noColor Boolean

Specifies whether to enable or disable the no color option in the color picker.

Default: false

presetColors {:}

Specifies custom colors to load into the palette.

Default: false

showButtons Boolean

Specifies whether to show or hide the cancel and apply buttons from the color picker.

Default: true

value String

Specifies the current HEX value selected in the color picker.

Default: #000000ff

Events

beforeClose EmitType<BeforeOpenCloseEventArgs>

Event callback that is raised before the color picker popup is closed.

beforeModeSwitch EmitType<ModeSwitchEventArgs>

Event callback that is raised before the color picker mode is switched.

beforeOpen EmitType<BeforeOpenCloseEventArgs>

Event callback that is raised before the color picker popup is opened.

beforeTileRender EmitType<PaletteTileEventArgs>

Event callback that is raised before each color palette tile is rendered.

change EmitType<ColorPickerEventArgs>

Event callback that is raised when the value of the color picker is changed.

close EmitType<OpenCloseEventArgs>

Event callback that is raised when the color picker is closed.

created EmitType<CreatedEventArgs>

Event callback that is raised when the control has been created.

onModeSwitch EmitType<ModeSwitchEventArgs>

Event callback that is raised once the color picker mode is switched.

open EmitType<OpenCloseEventArgs>

Event callback that is raised when the color picker is closed.

select EmitType<ColorPickerEventArgs>

Event callback that is raised when selecting a color in the picker or in the palette.