Palg

Color contrast checker

Enter a text and background color to get the WCAG 2.2 ratio and pass/fail badges. If a pair fails, Palg suggests the nearest color that passes.

Large text sample, 24px

Normal body text at 16px. The quick brown fox jumps over the lazy dog.

UI component

— WCAG 2.2 contrast ratio · APCA Lc — (advisory, draft method)

  • AA normal text (4.5:1)
  • AAA normal text (7:1)
  • AA large text (3:1)
  • AAA large text (4.5:1)
  • UI components & graphics (3:1)

Palette contrast matrix

How to use it

  1. Enter or pick a text color and a background color.
  2. Read the ratio and the AA/AAA badges for normal text, large text and UI components.
  3. If a check fails, click a suggested fix to apply the nearest passing lightness.
  4. Paste a full palette to see every pair in the contrast matrix.

What the WCAG thresholds mean

WCAG 2.2 measures contrast as a ratio of relative luminance, from 1:1 (identical) to 21:1 (black on white). Body text needs 4.5:1 for level AA and 7:1 for AAA. Large text — 24px regular or about 18.7px bold and up — needs 3:1 for AA and 4.5:1 for AAA. Non-text UI such as input borders, focus rings and icons that carry meaning needs 3:1 against adjacent colors (success criterion 1.4.11).

Palg truncates ratios rather than rounding them, because WCAG treats 4.499:1 as a failure. That matches how automated audits behave.

How suggested fixes work

When a pair fails, Palg keeps the hue and chroma of your text color and searches lightness in OKLCH, stepping darker and lighter until the target ratio is met. The first color found is the smallest visible change that passes, which keeps your brand color recognizable. You can also fix the background instead.

APCA as a second opinion

APCA is the candidate contrast method for a future WCAG 3. It accounts for polarity (dark-on-light versus light-on-dark) and reports a lightness contrast value, Lc. Palg shows it as advisory only: the method is still a draft and is not a legal or procurement standard. As a rough guide, Lc 75 or higher suits body text and Lc 60 suits larger text. Our contrast guide covers both methods.

FAQ

What contrast ratio do I need for AA?
4.5:1 for normal-size text, 3:1 for large text and for UI components and graphics.
Is APCA required?
No. WCAG 2.2 is the current standard. APCA is shown as an advisory, draft measure.
Does contrast depend on font weight?
Under WCAG 2.2 only through the large-text threshold: 18pt (24px) regular or 14pt (about 18.7px) bold counts as large.
Can I check a whole palette at once?
Yes. Paste up to ten HEX codes and the matrix shows the ratio for every pair with pass marks.

More Palg tools

Background reading: color guides · 1,000 named colors · install Palg as an app