IColorPickerMode
interface
Color
Descriptor for a single colour input mode (RGB, HSL, HSV, HEX) — holds the input field config, bi-directional HSVA conversion functions and the list of editable channel inputs.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- inputPropsrequiredRecord<string, unknown>
- Base props spread onto every channel input element for this mode (e.g. min/max/step for number inputs).
- inputsrequiredArray<{ [key: string]: any label: string getValue: (color: any) => number | string getColor: (color: any, v: string) => any }>
- List of editable channel inputs. Each entry has a display label, a getter to extract the channel value from a colour and a setter that merges a new channel value back into the colour.
- fromrequired(color: any) => THSVA
- Convert a colour from this mode's native representation (e.g. an RGBA object) to the internal THSVA tuple.
- torequired(color: THSVA) => any
- Convert the internal THSVA tuple back to this mode's native representation for output and display.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Shape of a custom colour mode descriptor