Short answer
Give each status a family, not a single colour: a strong variant for text and icons that meets 4.5:1 on your surfaces, a pale background variant, and a border. Expect the warning hue to be the hard one — yellows and ambers are too light for text on white — and plan separate values for dark mode. Pair every status with an icon and a word, because red and green are the colours most likely to be confused.
Almost every interface system uses red for errors or danger, amber or orange for warnings, green for success and blue for neutral information. These are design conventions shared with traffic signals and industrial signage rather than laws of perception, but users have learned them, so a system that uses green for errors pays a real cost. The conventions also create a problem: red and green, the two most important statuses, are the pair a red–green colour-vision deficiency is most likely to confuse, and they tend to have similar lightness. A status palette therefore has to be designed as a set, checked against itself and against the surfaces it will appear on in every mode.
The table measures CSS named status colours and Material-style defaults on white and on a #121212 dark surface. Pure CSS red is exactly at the 4:1 point on white: fine for icons and large text, not for body text. CSS orange and Material-style amber fall under 3:1 on white — they cannot even carry an icon or border there — but are among the best colours on dark. Material-style success green passes 3:1 on white but not 4.5:1, while its error red passes 4.5:1 on white but only 3:1-plus on dark. Pure blue flips the other way: excellent on white, failing on dark. No single hex value per status works in both modes; each status needs at least a light-mode and a dark-mode value.
Warnings are conventionally yellow or amber because those hues are conspicuous — on signage, bright yellow against black is the most visible combination. On a white screen, the same property works against them: a colour light enough to read as 'yellow' has too little luminance difference from white. The usual solutions are to make warning text a dark amber-brown (which passes but reads less clearly as 'warning'), to put dark text on a yellow or amber background banner, or to rely on the icon and label for meaning and use amber only in large fills. The second is the most robust: dark text on a pale amber fill keeps the warning association and passes contrast easily.
A practical status family has four tokens per status: status-danger-text (strong, 4.5:1 on the page surface), status-danger-icon (can be the same, needs 3:1), status-danger-surface (a pale tint for banners and inline messages) and status-danger-border. The text token must also be checked against the pale surface token, since error messages sit inside error banners. Each status should ship with an icon glyph in the component, not as an optional extra, because WCAG 1.4.1 does not allow colour alone to convey the status and because the icon is what distinguishes success from error for someone who cannot tell the greens from the reds. How forms use these tokens is covered in the accessibility guides.
| Colour | On white | On #121212 |
|---|---|---|
| CSS red #FF0000 | 3.99:1 icon/border only | 4.68:1 text ✓ |
| CSS orange #FFA500 | 1.97:1 fails 3:1 | 9.48:1 text ✓ |
| CSS green #008000 | 5.13:1 text ✓ | 3.64:1 icon/border only |
| CSS blue #0000FF | 8.59:1 text ✓ | 2.18:1 fails 3:1 |
| Material-style error red #D32F2F | 4.97:1 text ✓ | 3.76:1 icon/border only |
| Material-style amber #F9A825 | 1.97:1 fails 3:1 | 9.50:1 text ✓ |
| Material-style success green #388E3C | 4.11:1 icon/border only | 4.55:1 text ✓ |
Why: The warning colour is a bright amber or yellow.
Fix: Use dark text on a pale amber surface, or a dark amber-brown for text.
Why: The light-mode red was reused on the dark surface.
Fix: Give each status a lighter dark-mode value.
Why: Red and green of similar lightness with no icon.
Fix: Always include a distinct icon and a word such as 'Error' or 'Saved'.
Each statement is labelled by kind — established fact, a standard’s requirement, observed market data, a convention, or Colourwise’s own interpretation or analysis — with the strength of the evidence behind it.
Colourwise analysisStrong evidence
Pure CSS red (#FF0000) has a WCAG contrast just under 4:1 on white; CSS orange (#FFA500) has under 2:1 on white but over 9:1 on #121212; CSS blue (#0000FF) passes 8.5:1 on white but falls under 2.2:1 on #121212.
Based on: Computed by Colourwise with the WCAG 2.2 contrast formula from CSS Color 4 named-colour values; see the table.
Source: CSS Color Module Level 4; Web Content Accessibility Guidelines (WCAG) 2.2
StandardStrong evidence
WCAG 2.2 criterion 1.4.1 does not permit colour to be the only visual means of conveying information such as a status.
Source: Web Content Accessibility Guidelines (WCAG) 2.2; Understanding Success Criterion 1.4.1: Use of Color (WCAG 2.2)
ConventionModerate evidence
Red for danger, yellow or amber for warning and green for safe or success are shared conventions in safety signage and interfaces, not perceptual necessities, and their meanings differ between cultures.
Source: Human Interface Guidelines: Color; International Organization for Standardization (ISO) catalogue
Reviewed 29 September 2026. Colourwise summarises its sources in its own words and does not reproduce standards text or proprietary colour data. Spotted an error? Tell us.