A Dropdown containing a color value, an input for editing the color text, and sliders for choosing the color in RGB(A), HEX(8), or HSL(A) formats.
export type ColorFormat = 'hex' | 'rgb' | 'hsl';
Dropdown props are included.
/** The color value in HEX, RGB, or HSL format */
export let colorText: string = defaultColorText;
/** The current color format */
export let colorFormat: ColorFormat = 'hex';
/** Additional class names to apply. */
export let variant: string = '';
Dropdown events are included.
As a composite control that coordinates the input and the slider values, there are no slots for ColorPicker.
<div class="sterling-color-picker">
<Dropdown>
<div class="value" slot="value">
<div class="color-box" />
<Input />
</div>
<div class="sterling-color-picker-popup">
<div class="tabs">
<TabList />
</div>
<div class="sliders">
<HexColorSliders />
<HslColorSliders />
<RgbColorSliders />
</div>
</div>
</Dropdown>
</div>