notadevblog
Esc

    WCAG Contrast Checker

    Check the contrast ratio of text and background against WCAG 2.2 AA and AAA, with a suggested fix. Works with hex, rgb, hsl, oklch and transparency.

    The quick brown fox jumps over the lazy dog

    Contrast ratio
    Level AA AAA
    Normal text
    Large text
    UI components –

      Resolved colors: · APCA Lc (WCAG 3 draft, for information):

      At a glance

      Processing
      Locally in your browser, also offline once the page has been opened. Input never leaves your device.
      Standard
      WCAG 2.2 contrast ratio; the APCA value is shown as a draft for WCAG 3
      Colors
      Hex, rgb, hsl, oklch, Display-P3 and names; transparency is composited, colors outside sRGB are clamped and flagged
      For agents
      WebMCP: contrast_check · Module: /core/contrast-checker.js · Markdown · llms-full.txt

      How to Use

      1. 01 Enter two colors Type or pick the text color and the background color. Any CSS color works, for example #1a1a1a, oklch(0.6 0.15 250) or rebeccapurple.
      2. 02 Set the text size Enter font size and weight. Large text needs a lower ratio, so the verdict depends on size.
      3. 03 Read the verdict See the ratio, which levels pass and, if AA fails, the closest foreground color that passes.

      About this tool

      Low contrast is one of the most common accessibility failures. WCAG measures it as the ratio of the relative luminance of two colors, from 1:1 (identical) to 21:1 (black on white).

      The suggestion keeps hue and chroma and changes only the lightness in OKLCH, so the fixed color still looks like yours.

      Frequently Asked Questions

      More tools

      Cookie settings

      Here you can customize your cookie preferences.

      Necessary

      Essential for website functionality and security

      Preferences

      Remember your settings