Start a project

Tool 01 of 29 · Accessibility

Contrast Checker

Check any text and background colour against WCAG 2.2, see the nearest colour that passes if it doesn't, and turn a brand colour into an accessible palette.

Contrast Checker

Your colours

Hex, rgb(), hsl() or a colour name
Hex, rgb(), hsl() or a colour name

Body text at 16px. Can everyone read this comfortably?

Large text at 24px

Button

Contrast ratio

–

    APCA Lc ·

    Nearest passing text colour

    Accessible palette builder

    Turn one brand colour into 11 shades, with each shade's contrast as text on white and on black, and which text colour reads best on it.

    Hex, rgb(), hsl() or a colour name
    Used in the CSS variable names
    ShadeHexOn whiteOn blackText on it
    CSS variables
    JSON

    01

    What it does

    WCAG 2.2 AA and AAA checks, APCA, the nearest colour that passes, and an accessible palette from one brand colour.

    • WCAG 2.2 contrast ratio with AA and AAA results for normal text, large text and UI
    • APCA Lc as a second opinion
    • Nearest passing colour, keeping the same hue
    • 11-shade palette with contrast on white and black

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    CSS variables and JSON, with a Copy and a Download button on every result.

    • WCAG 2.2
    • APCA
    • OKLCH
    • CSS variables

    Why it matters

    About one in twelve men and one in two hundred women have some form of colour vision deficiency, and many more people read screens in bright sunlight or with tired eyes. Low-contrast text is the most common accessibility failure on the web: WebAIM's yearly review of the top million home pages finds it on most of them.

    WCAG 2.2, the standard UK public sector sites must meet and the one most accessibility audits use, asks for a contrast ratio of at least 4.5:1 for body text and 3:1 for large text and interface parts such as input borders and icons (level AA). The problem is that a brand colour that fails usually only needs a small nudge, and finding that nudge by hand is slow. This tool finds it for you, keeping the same hue so it still looks like your brand.

    How to use it

    1. Type or pick your text colour and background colour. Hex, rgb(), hsl() and colour names all work.
    2. Read the ratio and the five results. Body text needs AA normal; headings 24px and up need AA large.
    3. If it fails, press Use next to the suggested colour to swap it in.
    4. For a full palette, enter your brand colour below and copy or download the CSS variables.

    FAQ

    Why does #777777 on white fail?

    Its contrast ratio is 4.48:1, just under the 4.5:1 that WCAG AA asks for body text. #767676 is the lightest grey that passes on white, at 4.54:1.

    What is APCA?

    The Accessible Perceptual Contrast Algorithm, the method being developed for WCAG 3. It accounts for which colour is the text and how thin fonts are. It isn't a legal standard yet, so use the WCAG 2.2 results for compliance and APCA as a second opinion.

    What counts as large text?

    24px and up, or 18.66px and up if it's bold (that's 18pt and 14pt bold in the standard's terms).

    Is anything I enter sent anywhere?

    No. All the maths runs in your browser, so it keeps working offline once the page has loaded.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk