Color Contrast Checker
: Check text and background colors against WCAG AA and AAA contrast ratios- Contrast ratio
- 3.67:1
| Level | Needs | Result |
|---|---|---|
| AA normal | 4.5:1 | ✗ Fail |
| AA large | 3:1 | ✓ Pass |
| AAA normal | 7:1 | ✗ Fail |
| AAA large | 4.5:1 | ✗ Fail |
Sample
Large text: 24px regular
Normal body text at the default size, set on the background.
- Large text is 24px regular or 18.66px bold.
Color Contrast Checker
Check whether a text colour is readable on a background colour by the WCAG 2 contrast formula. You get the ratio, a pass or fail at each of the four AA and AAA levels, and the same pair rendered as real text.
How to check color contrast for WCAG
- Enter the foreground in
Textand the background inBackground, as hex,rgb(),hsl(),oklch()or a CSS name. Each field has a native picker and, in Chrome and Edge, an eyedropper that samples any pixel on screen.Examplesloads common pairs. - Read the ratio at the top of the
Contrastpane and theAA normal,AA large,AAA normalandAAA largerows below it, each marked Pass or Fail. - Judge the
Sample, which draws both colours as opaque text at 24px regular and at the default size. - Press
Swapto exchange the two fields, or the pane'sCopy allfor both colours, the ratio and all four results as tab-separated text.
Example
A mid grey on white, which falls just short of AA for body text and is a common near miss.
text: #777777
background: #ffffff#777777 on #ffffff: 4.47:1
AA normal needs 4.5:1 ✗ fail
AA large needs 3:1 ✓ pass
AAA normal needs 7:1 ✗ fail
AAA large needs 4.5:1 ✗ failDetails
- The ratio runs from 1:1 (identical) to 21:1 (black on white). It compares the relative luminance of the two colours, so it comes out the same whichever one is the text;
Swaponly changes the sample. AA normalneeds 4.5:1,AA large3:1,AAA normal7:1 andAAA large4.5:1. Large text means 24px regular or 18.66px bold.- The displayed ratio is cut to two decimals, not rounded. Pass and fail use the full number, so a pair at 4.499 shows
4.49:1and fails, instead of showing4.50:1beside a fail. - The sample and the
Copy alloutput use the opaque form of each colour, so they match the number shown. - When a field does not parse, the error shows under that field, and the
Contrastpane waits until it is fixed.
Limits
- WCAG 2.x only. APCA, the method proposed for WCAG 3, weighs font size and polarity and gives different results; it is not calculated here.
- Alpha is ignored, and a note says so when either colour has it. The real contrast of a translucent colour depends on what is behind it, so flatten it to a solid colour first.
transparentreads as black. - One solid background only. There is no way to test text over a gradient or a photo, and no suggestion of a nearby colour that would pass.
- It knows nothing about your font. Thin or decorative type can be hard to read at a passing ratio, and the size rows are for you to apply.
FAQ
What contrast ratio do I need for WCAG AA?
4.5:1 for body text and 3:1 for large text. AAA raises those to 7:1 and 4.5:1. All four are checked at once here.
Why does this show 4.47:1 where another checker shows 4.48:1?
#777777 on white is about 4.478. Some checkers round it up; this one cuts it to two decimals so the number shown can never look like a pass it did not earn. The pass or fail result does not depend on the display.
What counts as large text?
24px at regular weight, or 18.66px bold. WCAG states these as 18pt and 14pt bold. Anything smaller is held to the normal rows.
Does 3:1 apply to buttons and icons too?
Yes. WCAG 2.1 asks for 3:1 between interface components or meaningful graphics and what sits next to them, which is the same threshold as the AA large row. Put the two colours in and read that row.
Runs entirely in your browser. Nothing is uploaded.