Semantic Colour
Colour named by its job, such as error or success, and not by its appearance.
See it on the 3D treeGoing deeper
It adds a layer between raw palette values and the interface. A name such as colour-text-error points to a particular red, and that pointer can change per theme or brand without touching components. A descriptive name such as red-500 says what the colour is, not when to use it.
Why it matters
Roles keep meaning consistent across screens and make theming far easier, because you remap names instead of repainting every component.
In practice
A delete button uses the danger background role. In dark mode that role points to a different red, and the button needs no separate edit.
Common mistake
Using the success or error colour as decoration, which weakens its meaning when something really has succeeded or failed.
Connected terms
- Colour BlindnessStatus roles need icons or text too, since some people confuse their hues.
- Colour PsychologyInterface colours carry learned meanings such as error and success.
- BadgeStatus badges rely on consistent meanings for success, warning and error colours.
- Dark ModeEach role can map to a different value in the dark theme.
- Design TokensSemantic colours are usually stored as tokens that reference raw palette tokens.
- Error StateError states draw on the error role so failures look consistent everywhere.
- ThemingRole-based colour names are what make swapping themes manageable.