Colour
Roles rather than hex codes, with a light and a dark value each, measured on the page you are reading.
A component never names a colour. It names a role: the surface it sits on, the ink it writes in, the border that is its edge. Each role has a value per mode and per brand, so one component is correct in a light hipuku app, a dark one, and in vault's or core's colours, without a line of it changing.
Every swatch below is read from this page as you are looking at it, in the mode you are in. Switch the mode in the header and the values follow, because they are the same custom properties the components are reading.
Surfaces
What a thing is drawn on. default is the page, subtle is a quieter area within it, raised is a
card, overlay is anything floating, and sunken is a well.
Ink
What is written on them, with its measured contrast against the page. primary carries the words,
secondary the supporting line, tertiary the glyphs and the furniture, and placeholder the text
in an empty field, which is a different job from a glyph and so is a different role.
The numbers are WCAG 2.1 ratios, measured with @hipuku/colour, the same function the contrast
suite runs in CI. contrast.test.ts holds each pair at the bar that pair is for, in both modes:
4.5:1 for text on its surface, 4.5:1 for the placeholder, and 3:1 for ink-tertiary, which carries
glyphs and furniture rather than words. A pair that drops below its own bar fails the build.
Borders
control is the edge of an input, a select, a checkbox: the only thing separating it from the page,
so it carries 3:1 under WCAG 1.4.11. default is for cards, dividers and table rules, which are not
controls and do not need it.
Tones
Five meanings, each with a subtle fill, a border, a default, the ink that goes on each, and an emphasis for a glyph or a strong word.
The ramps underneath
Roles resolve to steps on a ramp. The ramps are OKLCH, which is why a step is the same lightness across hues and why a dark mode can be built by moving along the ramp rather than by inventing a second palette.
aroniadamsonelderberryA product never reads a ramp. It reads a role, and a brand file decides which step each role takes.