ColorComponent
Color picker component. Values are by default 6-digit hash-prefixed hex strings like #000000
.
Extends
ValueComponent
<string
>
Constructors
new ColorComponent()
new ColorComponent(
containerEl
):ColorComponent
Parameters
• containerEl: HTMLElement
Returns
Overrides
Properties
colorPickerEl
colorPickerEl:
HTMLInputElement
Access the underlying input element of type “color”
disabled
disabled:
boolean
Inherited from
Methods
getValue()
getValue():
string
Returns
string
Overrides
getValueHsl()
getValueHsl():
HSL
Returns
getValueInt()
getValueInt():
number
Returns
number
getValueRgb()
getValueRgb():
RGB
Returns
onChange()
onChange(
callback
):this
Parameters
• callback
Returns
this
registerOptionListener()
registerOptionListener(
listeners
,key
):this
Parameters
• listeners: Record
<string
, (value
?) => string
>
• key: string
Returns
this
Inherited from
ValueComponent
.registerOptionListener
setDisabled()
setDisabled(
disabled
):this
Parameters
• disabled: boolean
Returns
this
Overrides
setValue()
setValue(
value
):this
Parameters
• value: string
Returns
this
Overrides
setValueHsl()
setValueHsl(
hsl
):this
Parameters
• hsl: HSL
Returns
this
setValueInt()
setValueInt(
value
):this
Parameters
• value: number
Returns
this
setValueRgb()
setValueRgb(
rgb
):this
Parameters
• rgb: RGB
Returns
this
then()
then(
cb
):this
Facilitates chaining
Parameters
• cb
Returns
this