United Kingdom version. Explains the UK rules: WCAG 2.2 AA for public sector sites under the 2018 regulations, the Equality Act for everyone else, and GOV.UK colours tested. US version
Colour Contrast Checker (UK)
Check text and background colours against WCAG 2.2 AA, the level UK public sector websites must meet under the accessibility regulations, with exact ratios.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Color Contrast Checker?
In the UK, colour contrast is a legal question for public sector bodies. The Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 require their websites and apps to be accessible, and GOV.UK guidance sets WCAG 2.2 level AA as the standard to meet, with an accessibility statement. The Government Digital Service monitors compliance, and the Equality and Human Rights Commission (or the Equality Commission for Northern Ireland) enforces it.
For contrast, AA means 4.5:1 for normal text and 3:1 for large text (18 point, or 14 point bold). This checker computes the exact WCAG ratio and does not round it, which matters in audits: mid-grey #767676 on white is 4.54:1 and passes, while #777777 is 4.47:1 and fails.
Private companies are not covered by the 2018 regulations, but the Equality Act 2010 requires service providers to make reasonable adjustments for disabled people, and WCAG 2.2 AA is the usual benchmark when a website is judged against that duty.
- Exact WCAG 2.x contrast ratio from the official luminance formula
- AA and AAA results for normal and large text
- No rounding up: 4.499:1 is reported as a fail
- Accepts #rgb and #rrggbb, with a color swatch for each color
- Live preview at body, large and large bold sizes
- Runs in your browser
Updated
How to use the Color Contrast Checker
- Enter the text color in Foreground Color (Text) and the background in Background Color, as hex or with the color swatch.
- Read the Contrast Ratio and the Normal Text and Large Text badges: AAA, AA or Fail.
- Look at the Live Preview to see the pair at 16px, 24px and 18.66px bold.
- Use Swap Colors to test the reversed pair for dark mode, and Copy to paste the result into a ticket or design review.
Worked examples
GOV.UK Design System colours
Input
Text #0b0c0c, secondary text #484949, link #1a65a6 and error #ca3535, each on white
Output
19.58:1, 9.03:1, 6.07:1 and 5.15:1: all pass AA, the first two also AAA
The GOV.UK palette is built so text and links pass AA on white, which is the level its guidance requires.
White text on GOV.UK brand blue
Input
Text #ffffff on #1d70b8
Output
5.16:1, passes AA for normal and large text
It falls short of AAA (7:1), which the regulations do not require.
The grey that just fails
Input
#777777 on white, then #767676 on white
Output
4.47:1 (fails AA) and 4.54:1 (passes AA)
WCAG says the computed ratio must not be rounded, so 4.47 is a fail even though some tools display it as 4.5.
Orange buttons
Input
White text on #ff8c00, then black text on #ff8c00
Output
2.33:1 (fails even large text) and 9.00:1 (passes AAA)
Bright oranges and yellows usually need dark text to pass.
Background and insight
The formula comes from WCAG 2.0 (2008) and is unchanged in WCAG 2.1 and 2.2. Each sRGB channel is scaled to 0 to 1 and linearised: values at or below 0.04045 are divided by 12.92, the rest go through ((c + 0.055) / 1.055) raised to 2.4. Relative luminance is then 0.2126 R + 0.7152 G + 0.0722 B, which is why green contributes most to perceived brightness and blue barely matters. The contrast ratio is (L1 + 0.05) / (L2 + 0.05) with L1 the lighter color, giving a range from 1:1 to 21:1.
Success Criterion 1.4.3 (AA) asks for 4.5:1 for normal text and 3:1 for large text. 1.4.6 (AAA) raises that to 7:1 and 4.5:1. Large means at least 18 point or 14 point bold. CSS has 96 pixels per inch and 72 points per inch, so that is 24px regular or about 18.66px bold. A common mistake is reading "18" as 18px: a 20px semibold subheading is still normal text under WCAG.
WCAG explicitly says not to round: 4.499:1 does not meet 4.5:1. The successor algorithm being discussed for WCAG 3, APCA, weighs font size and polarity differently and often disagrees with these results, especially for dark mode. For legal and procurement purposes today (ADA cases in the US, EN 301 549 in the EU), WCAG 2 ratios are what auditors check.
Common use cases
Design reviews
Check each text and background pair in a palette before it reaches code, including placeholder and disabled text.
Accessibility audits
Verify findings from automated scanners and get an exact ratio to put in the audit report.
Dark mode palettes
Swap colors to test light text on dark surfaces, where low contrast mistakes are common.
Brand color decisions
Find out whether a brand color can carry white text or needs a darker shade for buttons and links.
Tips and limitations
- The accessibility statement explains how accessible the site is, so record any colour pairs that fail AA there along with your plan to fix them.
- Check focus states too. The GOV.UK focus style uses yellow #ffdd00 behind near-black text (14.54:1).
- Charts and form borders fall under the 3:1 non-text contrast rule (WCAG 1.4.11), which this checker also helps with: anything at 3:1 or more passes it.
Sources and further reading
- Understanding accessibility requirements for public sector bodies, GOV.UK. WCAG 2.2 AA, accessibility statements, monitoring by GDS and enforcement by the EHRC and ECNI.
- Colour, GOV.UK Design System. The palette used in the examples.
- Understanding Success Criterion 1.4.3: Contrast (Minimum), W3C Web Accessibility Initiative. The 4.5:1 and 3:1 thresholds, large text, and no rounding.
Frequently asked questions
Which WCAG version must UK public sector websites meet?
WCAG 2.2 at level AA, according to GOV.UK guidance on the 2018 accessibility regulations. Bodies must also publish an accessibility statement explaining how accessible the site is.
Do the accessibility regulations apply to private companies?
No. They cover public sector bodies, with exemptions such as most charities not mainly funded by the public sector and public service broadcasters. Private businesses still have duties under the Equality Act 2010, and WCAG AA is the usual reference point.
Who checks UK public sector websites for contrast?
The Government Digital Service monitors compliance on behalf of the Cabinet Office. Enforcement is by the Equality and Human Rights Commission in England, Scotland and Wales and the Equality Commission for Northern Ireland.
Are schools covered?
Primary and secondary schools and nurseries are partly exempt: they must make content needed to use their services accessible, such as forms, but not everything on the site.
Can I claim a disproportionate burden for colour contrast?
Only after a formal assessment, and you must say so in the accessibility statement. Contrast fixes are usually cheap, so the claim rarely holds for colours.
Is there an in-depth guide to the Color Contrast Checker?
Yes. “WCAG Color Contrast: How the Ratio Works and How to Pass AA” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.