Skip to content

Colour ​

Colour in Elody is defined as role tokens: each token says what a colour is for (--color-text-field-label), not what it looks like. Components only use role tokens, so a client theme can change the brand colours in one place.

Accent ​

The brand colours of a deployment: the colours a client theme usually changes.

TokenUse
--color-accentsection headers, primary buttons, active markers
--color-accent-hoverhover on accent-filled elements
--color-accent-lightpanel headers, chosen values
--color-accent-light-strongpanel borders
--color-accent-inktext on --color-accent-light
--color-accent-washhover on editable values and options; selected rows
--color-accent-tintbackground of grouped fields

Surfaces ​

TokenUse
--color-surfacecards, panels, inputs
--color-surface-apppage background
--color-surface-muteddisabled fills, subtle chips
--color-surface-sunkenpressed and open states
--color-surface-panel-headerpanel header band
--color-surface-row-hoverhover on list and table rows
--color-surface-invertedtooltips and notifications

Text ​

TokenUse
--color-text-bodydefault text
--color-text-strongemphasised titles
--color-text-secondaryfield values, secondary lines
--color-text-mutedmeta information, counts, hints
--color-text-field-labelfield labels
--color-text-linklinks
--color-text-placeholderplaceholder text only
--color-text-disableddisabled text

Borders ​

TokenUse
--color-border-defaultinputs, secondary buttons
--color-border-subtlemenus and listboxes
--color-border-faintseparators inside panels
--color-border-panelpanel outlines
--color-border-dashedadd buttons, drop zones, editable values

Fixed colours ​

These are the same on every deployment.

TokenUse
--color-commitsave buttons, checks, spinners
--color-focus-ringthe keyboard focus ring
--color-dangererrors and destructive actions
--color-successsuccess feedback
--color-warningwarnings
--color-infoinformation
--color-scrimthe backdrop behind a modal

Entity badges ​

Each entity type gets one of three badge tones, plus a grey chip for subtypes. The deployment's configuration decides which type gets which tone, and it never changes once set. There is no fourth tone.

Rules ​

  • Never use a colour as the only signal: badges carry a label, statuses carry text and errors carry a message.
  • Text must reach a 4.5:1 contrast ratio with its background (see accessibility).
  • Don't add a new role for a single component. Use an existing role, or a component token that points to one.

All colour tokens ​

Every colour token with its current value, read live from the interface. Scroll inside the frame, or open it in Storybook.

foundations-tokens--colourOpen in Storybook ↗

Client theming · Accessibility

Powered by Elody - Open Source Semantic Data Platform