ACCESSIBILITY

WCAG Contrast Checker Calculator

Use this WCAG contrast checker to compare a foreground HEX color with a background HEX color and calculate the contrast ratio. It shows AA and AAA pass/fail states for normal and large text. Use color picker and converter when you need to convert RGB or HSL values to HEX first, or CSS clamp and REM to PX when text sizing is part of the same design check. This tool updates as your inputs change.

Colour Pair

Compare foreground and background HEX colours.

Sample text

Contrast ratio 14.68:1

This preview uses your foreground and background colours so you can spot obvious readability issues before checking the pass table.

AA normal text

Pass

Threshold 4.5:1

AA large text

Pass

Threshold 3:1

AAA normal text

Pass

Threshold 7:1

AAA large text

Pass

Threshold 4.5:1

WCAG contrast checks compare relative luminance only. They do not evaluate font rendering, icon meaning, focus indicators, disabled states, hover states, motion, or whether colour is the only way information is conveyed.

About This WCAG Contrast Checker Calculator

This WCAG contrast checker compares two HEX colours and calculates the contrast ratio between foreground text and background colour.

It shows whether the colour pair passes common WCAG AA and AAA thresholds for normal text and large text, with a live preview so obvious readability issues are visible before you copy the colours.

Use it for UI colours, button text, headings, documentation examples, design-system tokens, and quick accessibility checks before a fuller design review.

WCAG Contrast Example

Dark slate text such as #1F2937 on a white background has a strong contrast ratio and generally passes normal-text thresholds. A pale grey on white can look subtle in a mockup but fail the same ratio check immediately.

Large text has a lower contrast threshold than normal body text because thicker and larger letterforms are easier to read. The calculator shows both so you can tell whether a colour pair is usable only for large headings or also for paragraph text.

The preview helps with human judgement, while the ratio gives the objective check. Use both: a pass result is useful, but you still need to inspect the actual component size, weight, state, and context.

How This Differs from a Color Converter

The color picker and converter is for converting HEX, RGB, HSL, HSV, and quick black-or-white contrast cues. This page is for comparing a specific foreground and background pair against WCAG-style contrast thresholds.

That distinction matters when you already know the two colours used in a button, card, chart label, code sample, alert, or navigation item. A conversion tool tells you what the colour is; a contrast checker tells you whether the pair has enough luminance separation.

For layout values around the colour system, pair this with the CSS clamp calculator, REM to PX converter, or viewport unit calculator.

Before Treating a Pair as Accessible

Contrast is necessary, but it is not the whole accessibility check. Font size, font weight, focus styles, disabled states, hover states, icon labels, motion, semantic HTML, and keyboard behaviour all matter.

Do not rely on colour alone to communicate meaning. A red error state, green success state, or coloured chart series should also have text, icons, patterns, labels, or another non-colour cue.

Use this calculator as a quick numeric screen, then test important UI in the actual product with the real text, type size, component state, and surrounding background.

A practical contrast checking workflow

Start with the exact foreground and background colours used in the component, not approximate palette names.

Check normal text and large text separately because the ratio threshold is lower for large or bold text.

Use the preview to catch obvious readability issues, then verify the real component with its actual font size, weight, padding, state, and background.

If the pair fails, adjust one colour at a time so the design change is easy to review.

What contrast alone cannot prove

A passing contrast ratio does not guarantee a fully accessible interface. Keyboard access, focus indicators, labels, semantic markup, motion, error messages, and responsive behaviour still matter.

Colour should not be the only signal. Errors, success states, chart categories, selected tabs, and warnings should also use text, icons, shapes, labels, or patterns.

Disabled states and placeholder text often need separate review because teams sometimes make them much lighter than normal body text.

For production accessibility reviews, use this as a quick numeric check alongside real-device testing and broader accessibility tooling.

What this WCAG contrast checker covers

This page should target WCAG contrast checker, color contrast checker, accessibility contrast checker, contrast ratio calculator, and AA AAA contrast searches.

It compares two solid HEX colours with the standard relative luminance contrast formula and reports common WCAG 2.x AA and AAA text thresholds.

It does not evaluate transparency, gradients, images, focus order, screen-reader behaviour, keyboard access, legal compliance, or full accessibility conformance.

WCAG Contrast Checker Calculator Example

A common workflow is to paste or enter a real sample, review the output, then adjust one setting at a time. This makes it easier to see exactly what changed and avoid copying an incorrect result.

For developer and web-design tasks, test the result in the place it will actually be used. Encoded text, CSS values, parsed URLs, timestamps, and generated strings can behave differently depending on the target system.

Practical Checks Before Using the Output

Check formatting, character escaping, units, timezone assumptions, and browser support before using the output in production. Small formatting differences can break code, URLs, data files, or layouts.

Avoid pasting private secrets, passwords, API keys, or personal data into tools unless you are comfortable with where that data is processed. These calculators are designed for convenient local checks, not secure secret handling.

Where This Helps in a Real Build

Design and frontend work often gets messy when values are guessed by eye. A calculator can turn a layout idea into a concrete number, whether you are scaling media, choosing colour formats, planning gaps, or building fluid CSS.

The best use is comparison. Try the value at small, medium, and wide sizes, then decide whether the output still feels balanced inside the actual component rather than only in the calculator preview.

Before You Paste Into CSS

Check the surrounding styles before copying the result. Padding, box sizing, container width, inherited font size, and browser rounding can all change how a mathematically correct value looks on the page.

Keep a short note of the design reason for the number if the value will live in production CSS. Future edits are easier when another person can see whether the value came from a ratio, a breakpoint, a spacing rule, or a one-off layout fix.

How to Use This Tool

  1. 1

    Enter the foreground colour

    Use a 3- or 6-digit HEX value for the text, icon, or foreground element.

  2. 2

    Enter the background colour

    Use the HEX value for the surface behind the foreground element.

  3. 3

    Review AA and AAA results

    Check normal-text and large-text pass/fail states alongside the contrast ratio.

  4. 4

    Inspect the preview

    Use the sample block as a quick readability cue, then verify the actual component in context.

Frequently Asked Questions

What contrast ratio does WCAG AA require?v

Common WCAG 2.x thresholds are 4.5:1 for normal text and 3:1 for large text. AAA commonly uses 7:1 for normal text and 4.5:1 for large text.

Does this prove my page is accessible?v

No. It checks colour contrast for one foreground/background pair. Full accessibility also includes structure, labels, keyboard access, focus visibility, responsive behaviour, motion, and more.

Can I use RGB or HSL values?v

This first version accepts HEX. Use the color picker and converter if you need to convert RGB or HSL into HEX first.

Does this handle transparent colours?v

No. Transparency depends on the colour underneath, so flatten transparent colours against their actual background before checking the contrast ratio.

Is this WCAG contrast checker a full accessibility audit?v

No. It checks one foreground/background colour pair. Full accessibility review includes structure, interaction, labels, focus, keyboard use, responsive behaviour, motion, and assistive technology testing.

Why do large text and normal text have different thresholds?v

Large or bold text can be easier to read at lower contrast than small body text, so WCAG 2.x uses different ratio thresholds for normal and large text.

Can I test transparent colours?v

Not directly. First flatten the transparent colour against its real background, then check the resulting solid foreground/background pair.