Skip to content

obsidian/ColorComponent

Mock of Obsidian’s ColorComponent, a color picker control.

Class Description
ColorComponent Mock of Obsidian’s ColorComponent. As in Obsidian, the value lives in ColorComponent.colorPickerEl, a real <input type="color">, so it reads as a lowercase six-digit hex string such as #ff8800 and starts as #000000. The RGB and HSL accessors convert to and from that string with Obsidian’s own formulas: HSL uses an integer hue from 0 to 360 and integer saturation and lightness from 0 to 100.