Colour Contrast & WCAG: Requirements, Ratios, and How to Test

WCAG requires 4.5:1 contrast for normal text, 3:1 for large text and UI components. Learn the exact rules, what is exempt, how to test, and how to fix failures.

93% Student Satisfaction (2K ratings)

Quantity Discounts

Price per course

6 to 20 courses

$20.95

21 to 50 courses

$17.95

51 to 200 courses

$13.95

201+ courses

Custom offer

πŸ“οΈ

The Three Contrast Ratios You Need to Know

Contrast is measured as a ratio between the relative luminance of a foreground colour and its background. The scale runs from 1:1 (identical colours, zero contrast) to 21:1 (pure black on pure white). WCAG defines three thresholds. For AODA compliance, the two Level AA ratios below are mandatory for Ontario organizations.

4.5:1
Normal text
βœ“ AA Required Β· AODA Mandatory
All body text, navigation, labels, buttons, and any text under 18pt regular or 14pt bold. This is the most commonly tested and most frequently failed ratio. Under WCAG SC 1.4.3.
3:1
Large text & UI components
βœ“ AA Required Β· AODA Mandatory
Text that is at least 18pt (β‰ˆ24px) regular, or 14pt (β‰ˆ18.66px) bold. Also applies to UI component borders and graphical objects under WCAG 2.1 SC 1.4.11.
7:1
Normal text β€” enhanced
β—‹ AAA Β· Not legally required
Not required under AODA. Targeting 7:1 provides maximum readability and protects users with severe low vision. Recommended for public sector and healthcare.
You cannot judge contrast by eye
Β 
Two colours that appear clearly distinct to one person may be indistinguishable to someone with low vision or deuteranopia (red-green colour blindness). Contrast ratios are objective measurements, not visual judgements. Always use a tool β€” do not rely on looking at the screen and deciding it “looks fine.”
Sample text
14:1 βœ“ Pass
#1A2E4A on #FFFFFF β€” excellent
Sample text
7:1 βœ“ Pass
#595959 on #FFFFFF β€” AA and AAA large text
Sample text
2.3:1 βœ— Fail
#AAAAAA on #FFFFFF β€” typical placeholder fail
Sample text
2.8:1 βœ— Fail
#4A90D9 on #D6EAFF β€” common design fail
πŸ“‹

The WCAG Criteria That Cover Colour Contrast

colour-contrast-accessibility-comparison

Three success criteria govern colour contrast in WCAG. Two are Level AA and are required under AODA. One is Level AAA, not legally required, but increasingly expected by public sector clients and accessibility auditors.

1.4.3 Level AA Contrast (Minimum) β€” text and images of text
Normal text (under 18pt regular or 14pt bold) must have a contrast ratio of at least 4.5:1 against its background. Large text must achieve at least 3:1. Covers all rendered text and all images containing text β€” banners, infographics, and promotional graphics included.
βœ“ Pass
Dark navy body text (#1A2E4A) on white (#FFFFFF) achieves approximately 14:1 β€” well above the 4.5:1 minimum. Bold 20px heading in mid-grey (#595959) on white achieves 7:1, passing large-text requirements.
βœ— Fail
Light grey placeholder text (#AAAAAA) on white achieves only 2.3:1. Mid-blue text (#4A90D9) on light blue (#D6EAFF) achieves approximately 2.8:1, failing even the large-text threshold.
1.4.6 Level AAA Contrast (Enhanced) β€” stricter text ratios
An enhanced version of 1.4.3 requiring 7:1 for normal text and 4.5:1 for large text. Not required for AODA compliance but reflects best practice for maximum readability. Organizations serving older adults, healthcare audiences, or users likely to have low vision should consider targeting Level AAA for body text.
βœ“ Pass
Pure black (#000000) body text on white achieves 21:1. Near-black (#1C1C1C) on white achieves approximately 18.1:1 β€” AAA compliant with a slightly warmer appearance.
βœ— Fail
Mid-grey (#595959) on white at 7:1 passes AA but sits right at the AAA boundary for normal text. Any body text lighter than approximately #595959 on white fails AAA.
1.4.11 Level AA Non-Text Contrast β€” UI components and graphics (WCAG 2.1)
Added in WCAG 2.1. The visual boundary of interactive components (form input borders, checkbox outlines, button edges) and parts of informational graphics (chart lines, icon shapes, graph axes) must have at least 3:1 contrast against adjacent colours. Not in WCAG 2.0, but organizations building to WCAG 2.1 or 2.2 must meet it.
βœ“ Pass
A form input field has a 1px border in #767676 on white, achieving 4.5:1 β€” well above the 3:1 minimum. A custom checkbox has a visible dark outline at 4.2:1 against the page background.
βœ— Fail
A text input field has a light grey border (#E0E0E0) on white, achieving only 1.6:1 β€” the field boundary is invisible to many users with low vision. A bar chart uses pastel colours below 2:1 against the white background.
πŸ” 

What Counts as Large Text

The distinction between ‘normal text’ and ‘large text’ determines which ratio applies. WCAG’s definition is precise and commonly misunderstood β€” large text is not simply ‘big enough to read easily.’

Text type Minimum size Font weight Contrast ratio required (AA)
Large text 18pt (approx. 24px) Any weight (regular or bold) 3:1
Large text β€” bold variant 14pt (approx. 18.66px) Bold only 3:1
Normal text Any size below the thresholds above Any weight 4.5:1
Measurements are in points, not pixels
Β 
One point equals approximately 1.333 CSS pixels. A 16px regular font is normal text requiring 4.5:1. An 18px bold font meets the bold threshold and qualifies as large text at 3:1. Most body text on websites is 14–18px regular weight β€” normal text requiring 4.5:1.
🚫️

What Is Exempt From Contrast Requirements

Not every element on a page must meet a contrast ratio. WCAG defines four explicit exemptions under SC 1.4.3. Understanding these prevents over-reporting in audits and helps teams prioritize correctly.

Exemption What qualifies Common example
Decorative text Text that conveys no information and that removing or changing would not affect page content A purely visual watermark or background pattern containing repeated text
Incidental text Text in photographs or images where the text is not the focus and is not needed to understand the content A street sign visible in the background of a lifestyle photo
Logotypes Text that forms part of a logo or brand name The wordmark inside your company logo image or SVG
Inactive UI components UI controls that are disabled and not interactive A greyed-out 'Continue' button before a required form field is completed
Exemptions apply only to specific elements β€” not entire sections
Β 
A common audit error is treating an entire hero image as exempt because it contains a background photo. If that hero contains a headline, subheading, or CTA button, those text elements must meet contrast requirements against whatever colour they are rendered on. The photo background is not automatically exempt.
πŸ–ΌοΈοΈοΈ

Text on Images, Gradients, and Patterned Backgrounds

colour-contrast-testing-workflow

Text placed over images, gradients, or patterned backgrounds is one of the most common sources of contrast failures in professionally designed websites. The contrast must be measured against the actual colour behind each letter β€” not an average of the background.

Hero Sections with Text Overlaid on Photography

A dark semi-transparent overlay placed between a photograph and white text is the standard technique for meeting contrast requirements in hero sections. The overlay must be dark enough that the resulting blended colour behind the text achieves 4.5:1 against the text β€” the photograph itself is irrelevant to the measurement.

Gradient Backgrounds Behind Text

When text sits on a gradient, the contrast must be evaluated at the point where contrast is lowest β€” not where it is highest. If a heading transitions from a dark left edge to a light right edge, the measurement is taken at the lightest point behind any character. If the worst-case point fails, the entire element fails.

White or Light Text on Coloured Buttons

White text on a coloured button is a common design pattern that frequently fails. A mid-blue (#4472C4) button with white text achieves only 3.2:1 β€” passing for large text but failing for normal-sized button labels. Darkening the button toΒ #2E5C9EΒ achieves 5.1:1.

Always test the worst-case point
Β 
When background colour varies β€” gradient, image, pattern β€” identify the background colour at the position where contrast is lowest. Test that specific point. If it passes, the element passes. If not, the entire element fails regardless of how well other areas perform.

Inline links within body text must meet contrast requirements in two directions simultaneously: the link colour against the page background (4.5:1), and the link colour against the surrounding body text (3:1 β€” or the link must be underlined, making colour distinction unnecessary).

Pair being tested Required ratio Why
Link text vs. page background 4.5:1 (or 3:1 if large text) SC 1.4.3 β€” the link text must be readable against its background
Link text vs. surrounding body text 3:1 SC 1.4.1 β€” if colour is the only way to distinguish the link from body text, that colour difference must be perceptible
Link text vs. page background on hover/focus Same ratios as above All interactive states must also pass β€” not just the default state
The simplest resolution: underline all inline links
Β 
Underlined links do not need to meet the link-vs-body-text contrast requirement because the underline provides a non-colour visual distinction. This is why most accessible design systems underline body text links by default.
πŸ”¬οΈ

How to Test Colour Contrast

Contrast testing combines automated scanning for straightforward cases and manual measurement for complex ones (text on images, gradients, or custom component states). No automated tool catches every contrast failure β€” manual testing is always required for a complete audit.

WebAIM Contrast Checker
Free web tool Β· webaim.org
Enter any two hex codes and get AA/AAA results instantly. Best for spot-checking specific colour combinations during design.
TPGi Colour Contrast Analyser
Free desktop app Β· Windows & Mac
Eyedropper picks colours from anywhere on screen β€” including rendered web pages. Essential for testing text on images and gradients.
axe DevTools
Free browser extension
Scans the rendered DOM and flags contrast failures with specific element locations. Best for catching failures across pages quickly.
WAVE
Free browser extension
Flags contrast errors and alerts with a visual overlay directly on the page. Ideal for developer workflow and instant in-browser feedback.
Figma Colour Contrast Plugins
Free design tool plugins
Tests contrast within Figma designs before handoff to development. A11y – Color Contrast Checker is the most widely used option.
Automated tools catch approximately 30–40% of contrast failures
Β 
Scanners cannot evaluate text on images, gradient backgrounds, component states (hover, focus, active), or elements rendered via canvas or SVG. A full WCAG audit requires manual testing with a colour picker for all cases where the background is not a single uniform value.
πŸ”§οΈ

How to Fix Colour Contrast Failures

Step 1 β€” Audit all colour pairs in your design system

Run the WebAIM Contrast Checker against every colour combination in your design system: body text on each background, heading colours, link colours in each state, button label on button background, input text on input background, placeholder text, helper text, error text, icon colours. Fix failures at the design system level and every instance inherits the fix automatically.

Step 2 β€” Adjust hue, not just lightness

Darkening a failing colour is the obvious fix, but it can break brand alignment. Shifting the hue slightly toward blue or purple often allows a darker value while remaining recognisably within the brand palette. Use tools like Accessible Colour Palette Builder (venngage.com) to find accessible variants of existing brand colours.

Step 3 β€” Check all interactive states

A colour that passes in the default state may fail on hover, focus, or active states. Test every state independently: default, hover, focus (keyboard), active (pressed), and visited (for links). Each state’s colour pair must independently meet the required ratio.

Step 4 β€” Address text on images last, systematically

Options in order of accessibility reliability: (1) add a sufficiently dark or light solid overlay behind the text; (2) apply a text shadow with adequate opacity; (3) place text inside a solid-colour container over the image; (4) replace the image with one where the area behind text is sufficiently uniform.

⚠️

Most Common Colour Contrast Failures in Ontario Websites

Failure pattern Typical cause Fix
Light grey placeholder text in form fields Placeholder set to #999 or #AAAAAA (2.3:1 against white) Darken to at least #767676 (4.5:1) or use a persistent visible label instead
White text on mid-tone coloured buttons Brand button colour too light for 4.5:1 against white text Darken the button background or switch to dark text if button colour cannot change
Low-contrast footer text Light text on mid-grey background for stylistic effect Test the actual footer colour pair β€” white on #6B6B6B achieves only 3.1:1, a fail for normal text
Hyperlinks indistinguishable from body text Link colour matches body text; underline removed via CSS Restore underlines or choose a link colour achieving 3:1 against body text AND 4.5:1 against the page background
Disabled-looking but active UI elements Greyed-out styling applied to active form fields for aesthetic reasons Disabled exemption only applies to genuinely inactive elements β€” active elements must meet 4.5:1
Text on hero image with no overlay White headline placed directly over a landscape photograph Add a semi-transparent dark overlay at sufficient opacity, or measure contrast at every background region behind the text
Thin icon outlines on white backgrounds Icon uses a single-pixel stroke in a brand colour below 3:1 (SC 1.4.11) Thicken or darken the stroke, or add a solid background area to the icon
❓

Frequently asked questions

What contrast ratio does AODA require?
  • Ontario’s AODA references WCAG 2.0 Level AA, which requires a 4.5:1 contrast ratio for normal text (under 18pt regular or 14pt bold) and 3:1 for large text. These ratios come from WCAG Success Criterion 1.4.3. The 3:1 ratio for non-text UI components (SC 1.4.11) is a WCAG 2.1 requirement and is not strictly part of the AODA obligation, but is expected in modern audits.
  • No. Text that is part of a logo or brand name is explicitly exempt from WCAG’s contrast requirements under SC 1.4.3. Your company wordmark does not need to pass a contrast ratio check. However, if your logo appears on a coloured background in the page header, other page elements nearby β€” navigation links, headings β€” still must meet their own contrast requirements.
  • No. Inactive user interface components that are visually disabled and not interactive are exempt from SC 1.4.3 and SC 1.4.11. However, this exemption applies only to genuinely disabled controls. If a button appears greyed out but is still clickable, it is an active component and must meet the full contrast requirements. A common audit failure is applying a disabled visual style to an active element for aesthetic reasons.
  • No. A 3:1 ratio is only sufficient for large text (18pt+ regular or 14pt+ bold). Normal-sized body text β€” most paragraph text on websites β€” requires 4.5:1 at Level AA. A common error is testing body text against the large-text threshold and reporting a pass. Always check whether the text qualifies as large text before applying the lower ratio.
  • Yes. Placeholder text is visible text rendered inside a form field before the user enters a value. It must meet the same 4.5:1 ratio as any other normal-sized text. The default browser placeholder colour (#AAAAAAΒ on white, approximately 2.3:1) fails WCAG 1.4.3. Placeholder text should be darkened, or β€” better practice β€” use a persistent visible label above the field and either remove the placeholder or use it for supplementary hints only.
  • Use the TPGi Colour Contrast Analyser, which includes an eyedropper that picks colours from anywhere on your screen including rendered web pages. Navigate to the page in your browser, open the tool, use the foreground eyedropper to pick a pixel of the text colour, and use the background eyedropper to pick the background colour directly behind that text. Test multiple positions if the background colour varies. The lowest ratio you find is the effective contrast of that element.
  • Under WCAG 2.1, focus indicators are covered by SC 1.4.11 (Non-Text Contrast), requiring 3:1 against adjacent colours. In WCAG 2.2, SC 2.4.11 and SC 2.4.13 introduce additional requirements for focus indicator size and contrast. If building to WCAG 2.2, focus indicators need a 3:1 contrast ratio change between focused and unfocused states, using a focus area meeting minimum size requirements.

Get a Full Colour Contrast Audit for Your Website

Automated scanning finds roughly a third of contrast failures. The rest β€” text on images, gradient backgrounds, interactive states, SVG icons, and canvas elements β€” require manual testing. Our WCAG compliance audit covers every contrast criterion with automated tools and manual eyedropper testing.