EquitableDocs Document Accessibility Guide

Colour and contrast

Overview

What colour and contrast cover

Two separate things sit under this topic. The first is contrast: how strongly your text stands out from the background behind it. The second is the use of colour to carry meaning, for example colouring overdue items red.

Contrast is measured as a ratio. Black text on a white page has the highest contrast. As the text colour gets closer to the background colour, the ratio drops, and the text gets harder to read. WCAG, the Web Content Accessibility Guidelines from the W3C, sets a minimum ratio that normal text must reach. If your text is pale grey on a white background, a reader with low vision can see that something is there but cannot make out the words.

Colour carrying meaning is a different problem. If the only way to tell that an item is overdue is that it is printed in red, then a reader with a colour vision deficiency, and a screen reader user who hears the text but not its colour, both miss the information. The fact that the item is overdue never reaches them.

A reader loses different things in each case. When contrast is too low, the words are present but unreadable for someone with low vision. When colour is the only signal, the meaning is present for some readers and invisible to others.

A PDF can be fully PDF/UA conformant and still fail on contrast

Contrast is the clearest example of the gap between two standards. PDF/UA, the accessibility profile for PDF, does not machine test text contrast. WCAG does. So a PDF can pass every PDF/UA check and still have text too faint for a reader with low vision to read.

Our tool measures the contrast ratio of your text against its background and reports it against the WCAG bar. So contrast is checked here, even though the PDF/UA test set leaves it out. Whether colour is the only means of conveying something is a separate matter that a person has to judge.

In depth

Text contrast below the bar

Contrast is the difference in lightness between your text and the background directly behind it. WCAG states the minimum as a ratio. Normal text needs a contrast ratio of at least 4.5 to 1. Large text needs at least 3 to 1. The larger and heavier the text, the lower the ratio it can get away with, because bigger shapes are easier to separate from the background.

A reader with low vision is the one affected. They can see the page. They cannot separate faint text from the colour behind it. The words are there, fully present in the file, and still unreadable.

A concrete case: your report sets body text in a light grey, around the colour a designer might call "soft grey," on a white page. It looks clean. Measured, it comes out at about 2.8 to 1, below the 4.5 to 1 bar. A reader with low vision sees a grey haze where the paragraph should be.

Before and after: the soft grey text at 2.8 to 1 is the before. Darkening that same text to a near black, which measures around 12 to 1, is the after. The layout does not change. The wording does not change. The text simply becomes readable.

This is the part a machine can do. Our tool reads the text colour and the background colour, calculates the ratio, and compares it to the bar. It can tell you the exact number and whether it passes. PDF/UA does not do this; it is a WCAG check, and our tool runs it for you.

Colour used as the only signal

The second case is colour that carries meaning on its own. A document marks every overdue item in red and every current item in black. The colour is doing real work: it tells the reader which items need attention. Nothing else on the page says "overdue."

Two readers miss this. A reader with a colour vision deficiency may not see the red as distinct from the black, so the warning never registers. A screen reader user hears the words of each item read aloud, but a screen reader does not announce text colour, so the distinction is simply not spoken. Both readers get the list and lose the meaning layered on top of it.

WCAG covers this under its rule that colour must not be the only way information is conveyed. The fix is to add a second signal that does not depend on colour. Keep the red if you like, but also label each overdue item with the word "Overdue," or mark it with a symbol such as an asterisk or a flag. Now the meaning reaches everyone: the colour helps readers who can see it, and the text or symbol reaches readers who cannot.

Before and after: the before is a schedule where overdue rows are simply red. The after is the same schedule where each overdue row still shows in red and also carries the word "Overdue" in its own column. A reader who cannot perceive the colour reads the word instead.

Where machine checking stops for this element

The two cases split cleanly along the line between what a machine can measure and what a person must judge.

A machine can measure text contrast. It reads two colours, the text and the background, and returns a ratio. There is a defined bar, so the result is a clear pass or fail. Our tool does this, which is why contrast appears in your report even though PDF/UA does not test it.

A machine cannot judge whether colour is the only means of conveying something. To know that "items in red are overdue," a checker would have to understand that the red is meaningful, that nothing else marks those items, and that the meaning matters. That is a judgement about intent and content, not a measurement. A person has to look at the document and decide. For more on this split, see the topic on what automated checking can and cannot find.

So for colour and contrast, the machine handles half and stops at the other half. It reports your contrast ratios with confidence. It cannot tell you whether you have used colour as the only signal anywhere; that is a human review.

Reference detail

Standards mapping

Item Identifier or detail
Contrast Minimum WCAG 1.4.3, Level AA: normal text at least 4.5 to 1, large text at least 3 to 1
Use of Color WCAG 1.4.1, Level A: colour not the only means of conveying information
Non-text Contrast WCAG 1.4.11, Level AA: contrast for user interface components and graphics
Matterhorn checkpoint 04 Colour and contrast
PDF/UA machine test Contrast is largely not in the PDF/UA machine-tested set; it is a WCAG matter

The Matterhorn Protocol checkpoint 04, Colour and contrast, exists, but contrast itself is largely judged by the WCAG rules rather than the PDF/UA machine set. A PDF can be fully PDF/UA conformant and still fail contrast. This is the clearest example of the gap between PDF/UA and WCAG. For the relationship between these standards, see the topic on PDF/UA and the Matterhorn Protocol.

What the machine checks and what a person checks

Case Who can check it
Text contrast ratio against the bar Machine: our tool measures the ratio and reports it
Whether colour is the only signal for some meaning Person: human judgement required

Named common mistakes

Mistake Effect
Pale grey text on a white background Falls below the 4.5 to 1 bar; unreadable for a reader with low vision
Colour-coded information with no text or shape backup Meaning is lost for readers who cannot perceive the colour, including screen reader users

The fix for low contrast is to darken the text colour until it meets 4.5 to 1. The fix for colour-only meaning is to add a text or shape label wherever colour carries meaning.

Authoritative sources


  1. W3C, "Understanding Success Criterion 1.4.3: Contrast (Minimum)" https://www.w3.org/WAI/WCAG21/Understanding/ 2024 

  2. W3C, "Understanding Success Criterion 1.4.1: Use of Color" https://www.w3.org/WAI/WCAG21/Understanding/ 2024 

  3. W3C, "Understanding Success Criterion 1.4.11: Non-text Contrast" https://www.w3.org/WAI/WCAG21/Understanding/ 2024 

  4. PDF Association, "The Matterhorn Protocol 1.1" https://pdfa.org/resource/the-matterhorn-protocol/ 2021 

  5. WebAIM, "WebAIM: Web Accessibility In Mind" https://webaim.org/ 2024