A color defined by the job it does in an interface — like 'success', 'warning', or 'danger' — instead of by its actual hue, so the same role can map to a different shade in light and dark themes.
Synonyms
- semantic color role
- color role
Related terms
In plain words
- naming a color by its job, like 'error red', instead of its shade
- colors labelled by what they mean, such as green for success
Usage example
We map the semantic color 'danger' to a bright red in light mode and a softer red in dark mode.
Don't confuse with…
- hex codeA hex code is one fixed literal color; a semantic color is a named role that can point to different hex codes depending on the theme.
Categories
- Color