Skip to content

Setting.addColorPicker method

Setting › addColorPicker

Official

Add a color picker component to the setting.

Signature:

addColorPicker(cb: (component: ColorComponent) => unknown): this

Parameters:

Parameter Type Description
cb (component: ColorComponent) => unknown The callback to add the color picker component.

Returns: thisThe setting.

Example:

setting.addColorPicker((colorPicker) => {
colorPicker.setValue('#000000');
});