Colour contrast: when the text is there but nobody reads it
AccessibilityWhich contrast the guidelines require, why colour must never be the only signal, who it affects, and how to check your own website in a few minutes.
9 min read
By Timo Wessels Published
There is a mistake almost every website has and almost nobody notices: text that looked good on the designer’s screen and disappears at the customer’s. Grey that is too light on white. White type over a photo. A placeholder in a form field that you can only guess at.
That is no matter of taste. There is a measure and there are limits.
The most important points first:
- Normal text needs a contrast of 4.5:1 to the background. Large text and controls need 3:1.
- Colour must never be the only sign for a piece of information.
- Check the colours when you choose them, not only afterwards.
What contrast actually is
Contrast describes the ratio of the brightness of two colours. Not their colourfulness and not their saturation, but their brightness. That is why a strong red on a strong green can look terrible and still have the same contrast value as two tame greys.
The value is written as a ratio and runs from 1:1 to 21:1. 1:1 is a colour on itself, 21:1 is black on white. It is calculated from the relative luminance of the lighter colour (L1) and the darker (L2):
contrast ratio = (L1 + 0.05) / (L2 + 0.05)
You never have to calculate this yourself. But a feeling for the order of magnitude defuses every discussion about brand colours: grey #767676 on white gives 4.54:1. For normal text that just suffices. A slightly darker grey, #595959, reaches 7:1 and thus even the highest level. Between “just passed” and “comfortable for everyone” lie two digits in a colour value. That costs almost nothing and looks no worse.
The limits
The WCAG are the international guidelines for accessible websites. Level AA sets:
| What | Minimum contrast | Rule |
|---|---|---|
| Normal text | 4.5:1 | 1.4.3 |
| Large text from 18 point (24 pixels) or bold from 14 point (about 18.5 pixels) | 3:1 | 1.4.3 |
| Controls, icons, focus frames, graphics that carry information | 3:1 | 1.4.11 |
The higher level AAA requires 7:1 for normal and 4.5:1 for large text (rule 1.4.6). The yardstick for the legal requirements is AA. According to the federal government, many requirements of the European standard EN 301 549, to which the German accessibility act refers, point to the WCAG rules. Hardly any grown brand palette reaches 7:1 throughout. You can aim for AAA. A missed AAA is not a defect in the same category as a missed AA.
Why 4.5:1? The W3C explains: the number compensates for the loss of contrast sensitivity that corresponds to a visual acuity of about 20/40. According to the W3C, 20/40 is the typical visual acuity of people around 80. The value is therefore no requirement for a small fringe group. It is the requirement for your oldest customers. For 7:1 the W3C reckons with an acuity of about 20/80. Whoever sees worse usually uses assistive technology anyway.
What else besides text needs contrast
This is where most websites make their mistakes, because hardly anyone looks. Rule 1.4.11 requires 3:1 for everything you must see to recognise and use a control:
- Form fields. If the border of an input field is the only sign that you can enter something here, it needs 3:1 against the background. A light grey field on white is the classic.
- Checkboxes and option fields. The box must stand out from the background and the tick from the box. Often the box has good contrast, and the tick is a pale light blue.
- The focus frame when tabbing through must stand out from the background.
- Drop-down arrows on select fields, often the only sign that something opens.
- Standalone icons. An icon with text beside it is decoration. An icon without text carries the information alone.
- Charts, as far as you need them to understand.
A special case that is often reported wrongly: the border of a button needs no contrast if the button is recognisable without it, through its visible content such as text. The W3C says so explicitly. Only when the border is the sole marking does it become a requirement. The focus frame needs contrast even then.
Colour must never be the only sign
This is a criterion of its own and the second big mistake in this field. Rule 1.4.1 (Level A) says: colour must not be the only visual means of conveying information. Rule 1.3.3 adds: instructions must not rely solely on shape, colour, size, position or sound.
The standard case is a form that marks required fields in red only. Whoever has trouble telling red and green apart does not see the marking, sends the form incomplete and gets the error message in red only too. The fix costs ten minutes: an asterisk in addition to the colour and above the form a sentence saying what the asterisk means.
<p>* Required field</p>
<label for="name">Name *</label>
<input type="text" id="name" name="name" required>
The same principle elsewhere:
- A link in running text needs a second feature besides colour, usually an underline.
- An error message needs, besides the red frame, a text that says what is wrong.
- A status such as “done” or “open” needs, besides the colour, a symbol or a word.
- “Click the blue button on the right” is doubly problematic: colour and position.
Whom this affects
Colour vision deficiency most commonly affects telling red and green apart. Other pairs such as green and brown or blue and violet can also be hard to tell apart.
Add groups that hardly anyone thinks of at the word accessibility:
- People with declining contrast sensitivity. From a certain age that is the normal case and no illness.
- Everyone who uses their phone outside. In sunlight a display’s contrast drops noticeably.
- Everyone with a simple or badly set screen.
The sunlight case convinces fastest. It affects not a minority but almost everybody, only temporarily.
What explicitly needs no contrast
The W3C exempts:
- Purely decorative text without information.
- Text in a logo or lettering. Your company logo does not have to meet the limits.
- Parts of disabled controls, such as a greyed-out submit button. It should still not be so pale that nobody notices it exists (my opinion).
How to check it yourself
- Single colour pairs. The Colour Contrast Analyser from TPGi is a free program with a pipette. Online there is WebAIM’s contrast checker. Take the actual background colour instead of assuming white. Very often it is a light grey, and exactly that tips a narrow combination.
- A whole page. The browser extension WAVE marks contrast errors directly on the page. It gives a good overview but does not find everything, above all nothing over images.
- Colour vision deficiencies. Chrome can simulate them in the developer tools under “Rendering”. You need no extension.
- The whole palette at once. In a contrast matrix you enter your colour values and see which text colour works on which background. Best before the colours sit in the whole website.
- Without a tool: the outdoor test. Go outside with your phone and read the home page. What disappears there is too weak.
The most common finds in my practice: placeholders in form fields, greyed-out help texts, the footer in light grey on a light ground, text on coloured buttons, text over images, the focus frame, labels in charts and the hover colours of links.
What you can do
Change the colour, not the font size. Larger type lowers the requirement from 4.5:1 to 3:1. Whoever enlarges body text so that a too-light grey formally passes has hidden the problem and not solved it.
Work on the palette, not on the single case. In a cleanly built website the colours live in variables. An adjustment in one place then works everywhere. Whoever darkens single text passages has fourteen different greys after half a year.
Pull problematic colour pairs apart in brightness. If red and green are needed side by side, making them stronger does not help. One darker and one lighter does.
Text over images: a surface in between. A semi-transparent dark layer or a coloured block of its own for the text. That works whichever image is inserted later, and later a different one is inserted. Contrast over photos cannot be measured reliably automatically: white type is readable in one spot and two centimetres further not. A human has to judge that.
Check while choosing the colour and not afterwards. Whoever checks while setting corrects one colour value. Whoever checks afterwards may have to rework a whole design.
Plan a buffer. The next version of the guidelines, WCAG 3.0, is still a draft. The draft says that the contrast method is not yet settled and probably takes font size and weight into account. A method called APCA, which some have promoted for it, was, according to Adrian Roselli, marked for removal from the draft in early 2023. Nobody should rebuild a website for that today. But whoever is setting a palette now is better off not landing exactly on 4.5:1.
Sources
- W3C, Understanding SC 1.4.3: Contrast (Minimum) — 4.5:1 and 3:1, large text, the rationale with 20/40 and age around 80, exceptions: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.6: Contrast (Enhanced) — 7:1 and 4.5:1, Level AAA: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.11: Non-text Contrast — 3:1 for controls and graphics, no border needed if visible content identifies the control: w3.org(external site: w3.org)
- W3C, Understanding SC 1.4.1: Use of Color — colour never as the only means: w3.org(external site: w3.org)
- W3C, Understanding SC 1.3.3: Sensory Characteristics — instructions not solely through shape, colour, size, position or sound: w3.org(external site: w3.org)
- W3C, WCAG 2.2: Definition of contrast ratio — formula and relative luminance: w3.org(external site: w3.org)
- Portal Barrierefreiheit des Bundes, WCAG und EN 301 549 — EN 301 549 refers to the WCAG criteria: barrierefreiheit-dienstekonsolidierung.bund.de(external site: barrierefreiheit-dienstekonsolidierung.bund.de)
- W3C, WCAG 3.0 Working Draft — the contrast method is yet to be determined, size and weight assumed: w3.org(external site: w3.org)
- Adrian Roselli, WCAG3 Contrast as of April 2026 — APCA marked for removal in early 2023: adrianroselli.com(external site: adrianroselli.com)
- TPGi, Colour Contrast Analyser: tpgi.com(external site: tpgi.com)
- WebAIM, Contrast Checker: webaim.org(external site: webaim.org)
- WebAIM, WAVE Evaluation Tool: wave.webaim.org(external site: wave.webaim.org)
- Chrome for Developers, Emulate vision deficiencies — simulating vision deficiencies in the developer tools: developer.chrome.com(external site: developer.chrome.com)
- Accessible Color Matrix: toolness.github.io(external site: toolness.github.io)
- Own testing practice — the sunlight and the outdoor test, the most common finds, work on the palette, a buffer when choosing colour.