The engine is a separate entry point, so you can use it without pulling in any React:
import { parse, toFormat, ingest } from "chroma-panel/core";Why HSVA is the internal model
HSV has two places where information disappears. At zero saturation there is no hue to speak of, and at zero brightness there is neither. Keeping state as RGB or hex loses the hue you picked the moment brightness hits zero.
The engine keeps the full HSVA value and merges changes into it, so dragging to an extreme and back returns the colour you started with. See about.
Where to go next
- Parsing — strings in
- Serializing — strings out
- Converting — between models
- Contrast — APCA and WCAG helpers