How Design Teams Document Colour-Contrast Decisions in a Design System

Minimalist graphic illustrating colour contrast in design systems, with WCAG accessibility ratios of 4.5:1 and 3:1.
Most contrast decisions are made once, in a hurry, and remembered nowhere. A designer picks a grey that looks quiet and modern, a developer copies the hex value into a component, and months later nobody can say whether that grey was ever checked, against which background, or at which size. The colour is still in the product. The reasoning is gone.That is the problem a design system is supposed to solve: not only a library of components, but a record of decisions, written so that a person who was not in the room can still make the same choice. Contrast is worth recording because it is easy to get wrong in a way that looks fine to the person who chose it and is unreadable to someone else.

This article explains what the published guidance requires, shows how one public design system records its colour decisions, and sets out a short, repeatable way to document a contrast decision.

What WCAG actually requires, in plain language

The Web Content Accessibility Guidelines (WCAG) 2.2, published by the World Wide Web Consortium (W3C), set the contrast rules most teams work to. Two success criteria do most of the work at Level AA, the level most accessibility policies and laws point to.

Success Criterion 1.4.3, Contrast (Minimum), at Level AA, requires text and images of text to have a contrast ratio of at least 4.5:1 against their background. Large text — at least 18 point, or at least 14 point bold (roughly 24 pixels, or about 18.5 pixels bold) — is given a lower bar of 3:1, because larger characters remain readable with less contrast. The criterion also covers images of text, such as words baked into a banner image: if the words are meant to be read, they count.

The exceptions are narrow, and teams often stretch them. Text in an inactive interface component, purely decorative text, text visible to no one, text incidental to a picture with other significant content, and text that is part of a logo or brand name have no contrast requirement under 1.4.3. A muted caption, a form placeholder, or a secondary label is not decorative simply because it is meant to be quiet: placeholder text must be read to use the form, so it needs the same 4.5:1 as body text.

The two criteria ask different questions, and passing one does not pass the other. Criterion 1.4.3 judges text — words and images of text — against its background, at 4.5:1, or 3:1 for large text. Criterion 1.4.11 judges everything else that must be seen to use or understand the interface: the boundary or state indicator of a control, and the parts of a graphic needed to understand it, each measured at 3:1 against the colours adjacent to it, not against the page background alone. A single button therefore needs two checks: its label under 1.4.3, and its border, tick, or focus indicator under 1.4.11. Inactive controls are exempt under 1.4.11, and no visible boundary is needed if text or an icon already identifies a control — but its focus indicator must still contrast.

Stylised lettering that functions as a graphic, and characters used as symbols (an “X” for close), are judged under 1.4.11, not 1.4.3.

Success Criterion 1.4.11, Non-text Contrast, also at Level AA, extends the idea beyond words: the visual information needed to identify a control or its state — a text field’s outline, a checkbox tick, a focused button’s border — and the parts of a chart needed to understand it need at least 3:1 against adjacent colours (W3C, Understanding Success Criterion 1.4.11: Non-text Contrast). A button whose border disappears into its background may contain readable text and still fail, because a person cannot tell where the control is.

Level AAA raises the bar: Success Criterion 1.4.6, Contrast (Enhanced) (W3C, Understanding Success Criterion 1.4.6: Contrast (Enhanced)), asks for 7:1 for normal text and 4.5:1 for large text. Most teams do not promise AAA across a whole product, but it is a useful target for older readers, people with low vision, and body text where a team wants more headroom.

Two details in the W3C’s explanations of 1.4.3, 1.4.6, and 1.4.11 catch teams out. First, the ratios are thresholds, and the computed value must not be rounded before it is compared with the threshold: 4.499:1 does not meet a 4.5:1 requirement, and 2.999:1 does not meet a 3:1 requirement, even though each rounds to the threshold. Showing a ratio to two decimal places is only a display shorthand, used after the pass-or-fail decision has been made on the full computed value; it must never turn a failing value into a pass. A record that says “4.50:1” for a computed 4.499:1 is wrong, however tidy it looks. Second, 4.5:1 allows for the loss of contrast sensitivity from moderately low visual acuity, colour vision differences, and ageing, adding headroom over the 3:1 minimum in earlier display standards. Contrast is a measurable property of two colours, calculated from relative luminance: (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter colour and L2 the darker. Black on white measures 21:1; two identical colours, 1:1. Every checker applies the same arithmetic.

One more criterion belongs here, though it sets no ratio of its own. Success Criterion 1.4.1, Use of Color, at Level A (W3C, Understanding Success Criterion 1.4.1: Use of Color), requires that colour is not the only way information is conveyed: an error shown only by turning text red, or a required field marked only by a coloured asterisk, fails even if every pair passes its ratio. A contrast record that never asks what else carries the meaning is incomplete.

A worked example from a public design system

The GOV.UK Design System, behind UK government services, is a useful example because it publishes both its colours and the rule behind them. Its colour guidance states that text and interactive elements must meet WCAG 2.2 Success Criterion 1.4.3 at Level AA, unchanged from WCAG 2.1 — naming the standard, version, criterion, and level, so a future reader does not have to guess which bar was aimed at.

Instead of a list of hex values to copy, the system organises colour by purpose: functional colours — named roles such as text, secondary text, link, link hover, link visited, focus, error, and brand — accessed through a function, govuk-functional-colour, rather than copied. If a colour changes, the change happens in one place. A hex value copied into a dozen components has to be hunted down one copy at a time, and one copy is always missed.

The published functional colours show what passing pairs look like in practice. Ratios below are shown to two decimal places for readability; each was compared with its threshold on the full computed value, before rounding. Body text is #0b0c0c, a near-black, on white: 19.59:1 by the WCAG formula. Secondary text, #484949, on white: 9.03:1 — well above the 4.5:1 minimum, which matters, because secondary text is often where teams first reach for a pale grey. Link blue, #1a65a6, on white: 6.08:1. Error red, #ca3535, on white: 5.16:1. Brand blue, #1d70b8, on white, and white text on brand blue: 5.17:1 either way. The focus state pairs near-black text with a yellow background, #ffdd00, at 14.55:1, so the keyboard focus indicator is visible as well as the text on it.

None of those numbers is close to the edge, and that is the lesson: a palette built with headroom survives small changes, while a pair passing at 4.51:1 is compliant on the day it is checked and fragile every day after. GOV.UK also separates colours by context — a focus yellow used decoratively breaks predictability even if the ratio passes.

The colour page shows what public documentation looks like: it states the rule, names the roles, gives the method, and warns against copying hex values. A private design system can do the same at smaller scale.

How to record a contrast decision

A usable contrast record needs only seven fields. Anything less leaves a question unanswered; anything more tends not to get filled in.

1. Token and role. The name used in code, and the job the colour does: for example, text-secondary, used for captions and metadata. Record the token, not just the hex value.

2. The pair, exactly as used. Foreground and background, with their values, and the surface they sit on. “Grey text” is not a pair. “#484949 on #ffffff, body background” is. If the text sits on a photograph, a gradient, or a tinted card, that surface is part of the pair, and the ratio must hold wherever the letters actually sit — not on an average of the background.

3. The measured ratio, compared before any rounding. The full computed number from a checker, with the checker’s name or the calculation method noted. Compare that full value with the threshold first; only then, if at all, show it to two decimal places for readability. A ratio of 4.48:1 fails 4.5:1, and so does 4.499:1. Writing “about 4.5:1” hides exactly the case that matters. The grey example is instructive: #767676 on white measures 4.54:1 and passes; #777777 on white measures 4.48:1 and fails. The two greys are indistinguishable to the eye. The record is what tells them apart.

4. Size and weight. The smallest size and the lightest weight at which the pair will be used. A pair that passes at 3:1 is only a pass if the text is genuinely large — at least 24 pixels, or about 18.5 pixels bold. If the same pair is later used at 14 pixels, the record must say the decision does not carry over.

5. States and neighbours. For interactive elements, the ratio for each state that matters — default, hover, focus, visited, error, disabled — and, for non-text contrast, the ratio against adjacent colours. A link that passes in its default state and fails on hover has a decision that is half recorded. Disabled controls are exempt from 1.4.3, but the record should say so explicitly, so nobody later “fixes” the disabled state by darkening it into something that looks active.

6. What else carries the meaning. The non-colour signal: an icon, an underline, a text label, a border change. If the answer is “nothing”, that is a finding, not a gap in the form.

7. Exception, if any — and its limit. If a pair relies on an exception, name it and bound it. “Logotype, exempt under 1.4.3” is a decision. “Brand colour, exempt” is not, unless the text is actually part of the logo.

A worked entry, using the GOV.UK example above, would read:

FieldEntry
Token / roletext-secondary — captions, metadata, helper text
Pair#484949 on #ffffff (body background)
Ratio (compared before rounding)Ratio (unrounded)9.03:1, WCAG formula, checked 1 Dec 2026
Size / weightSmallest use 14px regular; passes 4.5:1 for normal text
StatesNot interactive; no hover/focus states
Non-colour signalCaptions are labelled in words; colour is not the only signal
ExceptionNone

That entry can be checked by someone who was not present when it was written, which is the whole test.

Where the record lives matters as much as what it contains: it should sit next to the token definition — in the documentation, the token file’s comments, or the component page — not in a separate spreadsheet nobody opens. When a token’s value changes, the ratio, date, and checker should be updated in the same change, with the previous entry kept in history.

Common mistakes that make documentation drift

Four patterns account for most of the drift.

First, checking one background only. A pair checked on white is then used on a tinted card, a photograph, or a dark section, but text over a photograph must meet the ratio everywhere the letters sit. The usual fixes — a darkened overlay or a solid plate — belong in the record, with the ratio re-measured on the finished treatment.

Second, treating decorative text as essential, or essential text as decorative. Teams label small grey text “decorative” to avoid checking it, then reuse it as labels. The test is simple: if removing the text would remove information, it is not decorative.

Third, recording a ratio without context. A spreadsheet of numbers — “4.6:1, pass” — says nothing about which background, size, or state was measured. When the component changes, the number cannot be trusted, so it is ignored, and the check is repeated or skipped. Context is the difference between a record and a souvenir.

Fourth, letting the brand override the bar. Insufficient contrast is not exempted merely because a brand guideline requires the colour. A failing brand colour can still be used — for large headings, decorative elements, a logo — but the record must say where it may and may not be used, and the team must darken it for text rather than ship unreadable copy in the name of consistency. Legibility matters more than palette consistency, and a system that cannot say so will keep approving the same failure.

A checklist for the next colour change

Before a new colour, or a new use of an old colour, ships, run through this list. It takes minutes, and it is the whole workflow in miniature.

  • Name the token and its role. No token, no decision.
  • Write down the exact foreground and background, including the surface.
  • Measure the ratio, unrounded, with a named checker. Note the date.
  • Confirm the size and weight: 4.5:1 unless the text is genuinely large (24px, or about 18.5px bold), when 3:1 applies.
  • Check every state: hover, focus, visited, error, and the border or icon under 1.4.11 at 3:1.
  • Ask what else carries the meaning besides colour.
  • If an exception applies, name it and its limit.
  • Put the entry next to the token, in the same change as the colour, with the old entry kept in history.
  • Re-check when the background, the font, or the size changes — a decision does not survive a change to any of its inputs.

Contrast is not the whole of accessibility, and a passing ratio alone does not make a design usable. But it is one of the few requirements that can be measured exactly and checked by anyone with the same arithmetic — which is what makes it worth documenting. The next person to touch the palette should not have to guess whether a colour was chosen or merely happened.


References


Discover more from DesignRise

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from DesignRise

Subscribe now to keep reading and get access to the full archive.

Continue reading

✓

Thank you!

Your design project request has been sent successfully.

We received your brief and will review the details shortly. If we need any additional information, we will contact you by email.

DesignRise