Skip to main content

colorPicker()

colorPicker(color, onChanged, colorDiv, onOk, onCancel?, useAlphaChannel?): HTMLElement

Defined in: js-api/ui.ts:1289

Creates a color picker bound to colorDiv: clicking the element opens the picker, and its background updates live to preview the selected color.

Parameters​

ParameterTypeDefault value
colornumberundefined
onChanged(color) => voidundefined
colorDivHTMLElementundefined
onOkCallback | nullundefined
onCancelCallback | nullnull
useAlphaChannelbooleanfalse

Returns​

HTMLElement