Skip to Content
Getting startedFoundationsComponentsPackagesTools

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.

surface-defaultnot set
surface-subtlenot set
surface-raisednot set
surface-overlaynot set
surface-sunkennot set
surface-inversenot set

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.

ink-primarynot set
ink-secondarynot set
ink-tertiarynot set
ink-placeholdernot set
ink-linknot set
ink-disablednot set

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.

border-subtlenot set
border-defaultnot set
border-strongnot set
border-controlnot set
border-focusnot set

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.

primary-defaultnot set
info-defaultnot set
success-defaultnot set
warning-defaultnot set
error-defaultnot set
primary-subtlenot set
info-subtlenot set
success-subtlenot set
warning-subtlenot set
error-subtlenot set

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.

aronia
100
200
300
400
500
600
700
800
850
900
950
damson
0
50
100
200
300
400
500
600
700
800
900
950
elderberry
100
200
400
500
700
900

A product never reads a ramp. It reads a role, and a brand file decides which step each role takes.

On this page