ColorComponent
Defined in: obsidian.d.ts:682
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
Defined in: obsidian.d.ts:687
Parameters
containerEl
Returns
Overrides
Properties
changeCallback()?
optional
changeCallback: (value
) =>void
Defined in: src/obsidian/augmentations/Components/ColorComponent.d.ts:9
The function that’s called after changing the value of the component.
Parameters
value
string
Returns
void
colorPickerEl
colorPickerEl:
HTMLInputElement
Defined in: src/obsidian/augmentations/Components/ColorComponent.d.ts:13
Access the underlying input element of type “color”
disabled
disabled:
boolean
Defined in: obsidian.d.ts:423
Inherited from
Methods
getValue()
getValue():
string
Defined in: obsidian.d.ts:695
Returns
string
Overrides
getValueHsl()
getValueHsl():
HSL
Defined in: obsidian.d.ts:703
Returns
getValueInt()
getValueInt():
number
Defined in: src/obsidian/augmentations/Components/ColorComponent.d.ts:15
Returns
number
getValueRgb()
getValueRgb():
RGB
Defined in: obsidian.d.ts:699
Returns
onChange()
onChange(
callback
):this
Defined in: obsidian.d.ts:721
Parameters
callback
(value
) => any
Returns
this
registerOptionListener()
registerOptionListener(
listeners
,key
):this
Defined in: obsidian.d.ts:4219
Parameters
listeners
Record
<string
, (value
?) => string
>
key
string
Returns
this
Inherited from
ValueComponent
.registerOptionListener
setDisabled()
setDisabled(
disabled
):this
Defined in: obsidian.d.ts:691
Parameters
disabled
boolean
Returns
this
Overrides
setValue()
setValue(
value
):this
Defined in: obsidian.d.ts:708
Parameters
value
string
Returns
this
Overrides
setValueHsl()
setValueHsl(
hsl
):this
Defined in: obsidian.d.ts:716
Parameters
hsl
Returns
this
setValueInt()
setValueInt(
value
):this
Defined in: src/obsidian/augmentations/Components/ColorComponent.d.ts:16
Parameters
value
number
Returns
this
setValueRgb()
setValueRgb(
rgb
):this
Defined in: obsidian.d.ts:712
Parameters
rgb
Returns
this
then()
then(
cb
):this
Defined in: obsidian.d.ts:428
Facilitates chaining
Parameters
cb
(component
) => any
Returns
this