Color Contrast Checker

Ready

The pair

Hex, rgb(), hsl() or a CSS colour name. An alpha value is composited over the background and the result labelled as true for that backdrop only.

The font it will be set in

This is not decoration. WCAG calls text large at 24 px, or 18.67 px when bold, and large text only has to reach 3:1 instead of 4.5:1 — so the same two colours can pass as a heading and fail as a paragraph.

—

What it actually looks like

The number is a model, and a known-imperfect one. Look at this before you decide.

Worked out in this browser — nothing is uploaded and nothing is stored. A pass here means meets the letter of WCAG 2.2, not "reads well": the formula takes no account of font weight or stroke width and is known to behave badly in the mid-tones, which is why WCAG 3 is drafting a different measure. Ratios are compared at full precision, never rounded first — #777777 on white is 4.4781:1, which displays as 4.5 and fails.

The Colour Contrast Checker needs JavaScript: the ratio is computed in this browser. With JavaScript switched off there is nothing to do the work.