Colour Contrast Checker
Check if your text and background colours meet WCAG accessibility standards (AA & AAA). Auto-fix suggestions included
Foreground Color
Preview
Background Color
Preview
Live Preview
Contrast Ratio
WCAG Results
What Contrast Ratio Does Your Text Actually Need?
WCAG 2.1 sets two thresholds. AA needs a ratio of at least 4.5:1 for normal body text and 3:1 for large text (18pt and above, or 14pt bold). AAA is stricter at 7:1 for body and 4.5:1 for large text. Anything below 3:1 fails for everyone. The number itself is a maths comparison of relative luminance, not a perception score, so two colours that look similar to you can still pass while two that look different can fail.
Most production sites aim for AA on body text and AAA on critical UI like form errors and pricing. The reason is pragmatic: hitting AAA on every paragraph forces a near-monochrome palette and most clients reject it. A safe default is body copy at 7:1 or higher, secondary text at 4.5:1, and disabled or placeholder text accepted at 3:1 with a clear non-text indicator. Run anything you publish through a checker like this one before launch, not after.
Large Text vs Normal Text - The 3:1 Loophole
The WCAG large text rule is widely misunderstood. It only applies to text that is 18pt (24px) and above, OR 14pt (about 18.66px) and above when bolded. A 16px headline that looks big on screen is still 'normal text' for the purposes of contrast and needs 4.5:1. The threshold drops to 3:1 because larger and heavier strokes are easier to read against a low-contrast background, not because designers feel like it.
If you have a hero headline at 64px in light grey on white, you are probably fine at 3:1. If you have body copy at 16px in the same grey, it fails. The fix is rarely to enlarge the body copy; it is to darken the text or lighten the background a few shades. Use the auto-fix suggestions in this tool to see the smallest possible change that takes you from failing to passing. For graphics and icons, the rule is again 3:1 against the adjacent colour.
Why Brand Colours Fail Accessibility (and How to Fix It Without a Rebrand)
Brand palettes get designed for posters and packaging where contrast is huge. They get reused on websites where 16px text on a 'brand light blue' button suddenly fails. A common offender: white text on the brand-blue button at #2563eb hits about 4.6:1, just passing AA, but the same button in a 'lighter, friendlier' shade at #60a5fa drops to 2.4:1 and fails completely. You did not change the brand. You ruined accessibility.
You almost never need to change the hue. You need to change the lightness. Take the brand colour into HSL, hold the hue and saturation, and slide the lightness up or down until you pass. The auto-fix in this tool does exactly that. If you must keep the exact failing brand colour for a button, pair it with a darker text colour (deep navy on light blue often works), or add an underline so you are not relying on contrast alone. Want the underlying numbers? See the [hex to RGB converter](/hex-to-rgb) and [colour palette generator](/colour-palette-generator).
Don't Forget Focus Rings, Borders and Disabled States
Contrast applies to more than paragraph text. WCAG 2.1 added a 3:1 minimum for non-text content used to identify UI components and their states. A focus ring of 1px in a colour that barely shows against the background fails the same way ghost-grey text does. Form input borders against a white card need 3:1. Selected vs unselected toggles need 3:1 between them. Most design systems we audit fail on focus rings before they fail on body copy.
The mistake is showing only one state to the contrast checker. Audit your hover state, your focus state, your selected state, your error state and your disabled state separately. Disabled buttons are exempt from contrast requirements (WCAG calls them 'inactive'), but if you greyed out a button without making it look disabled, sighted users still need to know they can't click it. A 3:1 focus ring against the page background is the single most reliable accessibility win you can ship in an afternoon.
Frequently Asked Questions
What's the difference between AA and AAA?
AA is the working legal standard in the UK (Equality Act 2010 case law) and the US (ADA Title III, Section 508, plus the European Accessibility Act 2025). AAA is an aspirational target. Body text passes AA at 4.5:1 and AAA at 7:1; large text passes AA at 3:1 and AAA at 4.5:1. Most public sector and regulated sites must hit AA on every page. Aim for AAA on body copy if you can, but never miss AA on critical content like prices, error messages and CTAs.
Does contrast matter on dark mode?
Yes, identically. The ratio is symmetric: white text on black has the same 21:1 ratio as black on white. Dark mode failures usually come from designers picking 'light grey on dark grey' for a softer look. A pale grey (#a3a3a3) on a near-black (#1a1a1a) hits about 6.4:1 and passes AA but fails AAA for body. Test both your light and dark themes in this checker before shipping; do not assume that if one works the other does.
What about coloured text on coloured backgrounds?
All combinations are tested by the same maths: relative luminance of the text vs relative luminance of the background. Yellow (#ffff00) on white fails badly (1.07:1). The same yellow on black smashes it (19.6:1). The colour wheel does not predict contrast - luminance does. If you must use a low-contrast pair for visual reasons (a watermark, a decorative caption), make sure the same information appears elsewhere in passing contrast.
Will this tool fix my colour, or just check it?
Both. Enter your text and background, and the checker shows the current ratio plus the AA / AAA pass-or-fail badges. If you fail, click the auto-fix button and the tool keeps the same hue and saturation but darkens or lightens until you pass at the target threshold. You can pick which side to adjust (darken the text or lighten the background) so you keep your design intent.
Is there a legal requirement to meet WCAG AA in the UK?
Public sector bodies in the UK must meet WCAG 2.1 AA under the Public Sector Bodies (Websites and Mobile Applications) Accessibility Regulations 2018. Private companies are covered by the Equality Act 2010, which requires reasonable adjustments; courts have repeatedly cited WCAG AA as the practical standard. From June 2025 the European Accessibility Act extends similar duties to most consumer-facing services across the EU. The short answer: yes, you should meet AA, and large companies are increasingly being sued when they don't.
Related Tools
Password Generator
Generate strong, secure passwords with customisable length and character options. Uses cryptographically secure randomisation.
Word Counter
Count words, characters, sentences and paragraphs in your text. Includes reading time, speaking time and word frequency analysis.
Cron Expression Builder
Build and understand cron expressions with an interactive visual editor. Click to set schedules, see plain-English translations and next run times.