Skip to contentAltstamp
Menu

Use of colour (not just contrast)

Updated . An 8 minute read.

Line drawing of a form with one input marked by a warning shape and ringed in orange
Fig. 1A form with one field marked by a warning shape as well as the focus ring so the problem does not rest on colour

Three orders and their payment status

  • Fails 1.4.1Coloured dots

    • Order 1042
    • Order 1043
    • Order 1044

    Paid, waiting, refused: the three dots differ by hue alone (about 1.1:1 in lightness).

  • PassesStatus words

    • Order 1042Paid
    • Order 1043Waiting
    • Order 1044Refused

    The same tints, now carrying a word. The colour helps people who see it; the word works for everyone.

Press "Show without colour". The dots turn into three greys that look the same; the words still say Paid, Waiting and Refused. That difference is the whole of 1.4.1.

The rule: colour is never the only cue

What WCAG asks: 1.4.1 Use of Color, Level A

Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.

It is Level A, so it sits inside every Level AA target. W3C's note on it names who it is for: people with partial sight, who often see colour poorly; many older people; people with a colour vision deficiency; and anyone on a monochrome screen or a black-and-white printout. W3C is just as clear that the rule does not discourage colour, or even colour coding, as long as something else carries the meaning too.

It is a different question from contrast. The contrast rules ask whether text stands out from its background; 1.4.1 asks whether the meaning survives once the hue is gone. A page can pass every contrast check and still fail here, as the samples below do.

Three details people miss

  • Lightness counts as a second cue. Two colours that differ by at least 3:1 in relative luminance, like a light green and a dark red, are told apart by lightness, not hue alone. But if the reader has to know which colour is which (a green outline for valid, red for invalid), W3C says another cue is needed whatever the ratio.
  • It is about sight, not screen readers. What a screen reader announces is covered by 1.1.1, 1.3.1 and 4.1.2. A hidden "error" label read aloud does not fix a red border a sighted visitor cannot tell apart.
  • Visited links are not your job. Browsers only let pages change the colour of a visited link, so W3C does not count a colour-only visited state as a failure.

Form errors and required fields

W3C's failure F81 describes the two habits exactly: a required field marked only by a red label, and a field with an error marked only by red. The fix it points to is plain text: the word "required" inside the label (technique G205, so it is also read out with the field), and an error message that says what went wrong. A bold label or a strong enough lightness difference also meets 1.4.1, but F81 warns that the form may still fail other criteria, such as 3.3.1 Error Identification, which wants the error described in text.

An email field with a mistake in it

  • Fails 1.4.1Colour only

    Fields in red are required.

    Name

    Jo Rivera

    Email

    jo.example.com

    Which field is required, and what is wrong with it? Only the red says so (W3C failure F81).

  • PassesWords beside the colour

    Name

    Jo Rivera

    Email (required)

    jo.example.com

    Error: the email needs an @, like jo@example.com

    "(required)" sits inside the label (G205) and the message names the problem in words.

The asterisk is common and works when the form says what it means at the top. The rest of a good form (labels, error messages tied to their fields, a sensible order) is in accessible forms.

Charts, graphs and maps

A chart that tells series apart by a colour key fails as soon as two of its colours have similar lightness, and brand palettes are full of those. W3C's technique G111 pairs every colour with a pattern: a bar chart where each region has its own fill pattern and the key shows the same patterns, or a transport map where each route's stops have their own shape, a diamond on one line and a square on the next. Labelling bars and lines directly, with their values in text, removes the key altogether.

Table bookings by source, an example

  • Fails 1.4.1A colour key

    AugSepOctWebsitePhone

    Green for the website, red for phone. Without hue the two bars in each month look the same.

  • PassesPattern and values

    4238Aug5133Sep6429OctWebsitePhone

    Phone bars are hatched, the key shows the hatch, and each bar carries its value (G111).

Two more traps. A star rating whose filled stars are yellow and empty ones white, with the same outline, relies on hue; W3C uses it as its own example of a 1.4.1 fail. And when a chart or map is an image, its alt text has to carry what the colours mean, or it fails twice (F13). The alt text check helps with the wording. The parts of a chart also need 3:1 against their background under 1.4.11, as the contrast guide explains.

Line drawing of a bar chart with a shape on each bar, one bar ringed in orange
Fig. 2Each bar carries its own shape on top so the series can be told apart without colour

Status badges, toggles and the current tab

Order lists, booking calendars and dashboards love a traffic light. Green, amber and red feel obvious, but in many palettes they sit at nearly the same lightness. This site's own success, warning and error colours are only 1.01 to 1.14:1 apart, so it never lets them speak alone: every status here is a word, and the comparison tables say Yes, No, Not stated or Check with the vendor, never a tick. The audit services comparison shows the pattern, and the three orders at the top of this page show what the dots lose without their hue.

The same applies to state. A selected tab or filter shown only as a darker shade of the same button fails 1.4.1; W3C uses exactly that as its example. Add a bold label, a bar under the current tab or a border, and give it aria-selected or aria-current so a screen reader hears it too. An on/off switch needs a word or a moving thumb, not just a colour change.

How to check a page for colour-only meaning

Every pair of samples above has a "Show without colour" button. It lays a greyscale filter over the samples: a rough stand-in that removes hue and keeps lightness, the thing this rule is about. It is not a simulation of any particular colour vision deficiency; W3C calls people who see no colour at all rare. It answers one question well: is anything left that only colour was saying?

Scroll sideways to see the fix for each row.

Where colour carries meaning, the colour-only version that fails 1.4.1, and the cue that fixes it
WhereColour aloneAdd this
Links in a paragraphF73, G183Link text a different colour, no underlineAn underline, or at least 3:1 lightness difference from the text around it
Form errorsF81, G14The field's border turns redA written message that names the problem, next to the field
Required fieldsF81, G205Required labels printed in redThe word "required" inside the label
Charts and graphsG111, F13Series told apart by a colour legendPatterns or shapes, direct labels, values in text
Status badgesG14A green, amber or red dotA status word: Paid, Waiting, Refused
Maps and diagramsG111Routes or zones in different coloursA distinct shape or line style per route, named in a key
Selected tabs and filters1.4.1The current tab is a different shadeA bold label, an underline bar or a border on the current one

Colour can stay in every row. The rule only asks that something besides colour carries the same meaning.

  1. Find every place a colour means something: the table lists the usual ones on a small-business site.
  2. View the page in greyscale (most operating systems have a greyscale display filter) or print it in black and white.
  3. For each place, ask whether a word, a shape, a pattern, an underline or a 3:1 lightness step still carries the meaning.
  4. Run a scanner for the links; that is the part of 1.4.1 scanners can measure. The rest needs a person looking, which is why it is a line of the WCAG 2.2 AA checklist.

Quick reference

  • 1.4.1 Level A: colour is never the only cue. Colour can stay.
  • Links in text: underline them, or keep 3:1 from the text around them (G183).
  • A cue that shows only on hover or focus does not count (F73).
  • Forms: "(required)" in the label, and an error message in words (F81, G205).
  • Charts and maps: patterns, shapes or direct labels (G111); alt text names what colour meant (F13).
  • Status: a word in every badge. State: a bar, bold or border on the current item.