Skip to content
Inspireca Design

UI Foundations · Colour

Colour roles instead of colour names

Decide what each colour is for, such as background, text, primary action or error, and you can change the palette later without redrawing the product.

Written by Inspireca Design (drafted with AI assistance)Updated Not yet reviewed by an editor

In short

  • Name colours by what they do: background, surface, text, primary, danger.
  • Most of a screen should be neutral; colour is for meaning and action.
  • Check every text and background pairing for contrast when you choose it.
  • Roles make a dark theme a remapping exercise instead of a redesign.

"Blue-500" tells you what a colour looks like. "Primary" tells you when to use it. Products that only have the first kind of name end up with eleven slightly different blues and no rule for choosing between them.

A starter set of roles

  • Background: the page itself.
  • Surface: cards, sheets and fields that sit on the background.
  • Text and muted text: main reading text, and supporting text such as captions.
  • Border: lines and field outlines.
  • Primary and on-primary: the main action colour, and the text colour used on top of it.
  • Danger, success, warning: meaning colours for states and messages.

That is about ten roles. Many products never need more.

Mostly neutral

Look through the apps in the library and notice how much of each screen is white, off-white, grey or near-black. Brand colour usually appears in a few places: the primary button, a selected state, an illustration. Because it is rare, it carries meaning. If everything is colourful, nothing stands out.

Choose pairs, not swatches

A colour is only readable in combination with another. When you pick a role, test it against the roles it will sit on, using the numbers in the contrast lesson: muted text on background, on-primary on primary, danger text on surface. Record the pairs that pass and use only those.

Meaning stays fixed

If red means "error" on one screen, it cannot mean "sale" on another. Keep each meaning colour for one meaning, and always pair it with words or an icon so that it does not depend on colour vision.

Themes become easy

With roles in place, a dark theme is a second list of values for the same names: background becomes near-black, text becomes near-white, and every screen follows. Without roles, it is a redesign of every screen.