What Is a Good Contrast Ratio? WCAG 2.2 Numbers Explained

Quick Answer
A good contrast ratio is at least 4.5:1 for normal text and 3:1 for large text, icons and input borders. That is the WCAG 2.2 Level AA bar, and it is the number most teams and legal checklists aim for. For the stricter AAA level, aim for 7:1 on normal text and 4.5:1 on large text. A contrast ratio is a number from 1:1 (no difference) to 21:1 (black on white).
On this page
Key Takeaways
- WCAG 2.2 AA asks for 4.5:1 on normal text, 3:1 on large text, and 3:1 on UI components and meaningful graphics.
- AAA raises the text targets to 7:1 (normal) and 4.5:1 (large).
- Large text means 18 point, or 14 point bold, which is roughly 24 px or 18.66 px.
- Ratios are never rounded: 4.499:1 fails 4.5:1, so we show them truncated.
- The ratio ignores hue, so a color can look fine to you and still fail. Always measure.
What contrast ratio does WCAG 2.2 require?
WCAG, the Web Content Accessibility Guidelines from the W3C, sets different minimums for different jobs. Three success criteria cover almost everything you will design:
- 1.4.3 Contrast (Minimum), Level AA: text and images of text need at least 4.5:1, or 3:1 for large-scale text [1].
- 1.4.6 Contrast (Enhanced), Level AAA: text needs at least 7:1, or 4.5:1 for large-scale text [2].
- 1.4.11 Non-text Contrast, Level AA: the visual information needed to identify UI components and states, and the parts of graphics needed to understand content, need 3:1 against adjacent colors [3].
Here is the same thing as a quick reference.
| What you are checking | AA (the usual target) | AAA (stricter) |
|---|---|---|
| Normal text | 4.5:1 | 7:1 |
| Large text | 3:1 | 4.5:1 |
| UI component borders, icons, focus rings | 3:1 | no separate AAA level |
| Logos and purely decorative text | no requirement | no requirement |
The scale below shows where those thresholds sit between 1:1 and 21:1. Notice how much of the range is "easy": most of the effort goes into the first few steps.
How is a contrast ratio calculated?
You do not need to do this by hand, but knowing the steps explains why some pairs surprise you. The ratio compares the relative luminance of two colors. Relative luminance is a measure of how bright a color is, from 0 (black) to 1 (white). WebAIM notes that the ratio runs from 1:1 to 21:1 and that swapping text and background colors does not change it [4].
The steps:
- Convert each red, green and blue channel from its stored sRGB value to linear light.
- Weight the channels by how bright the eye finds them: luminance is 0.2126 R + 0.7152 G + 0.0722 B [1]. Green counts for far more than blue.
- Divide: (lighter luminance + 0.05) / (darker luminance + 0.05).
If you would rather skip the arithmetic, paste two colors into the contrast checker and it shows the ratio plus every pass or fail at once. To read a value you found in a stylesheet, the HEX to RGB converter gives you the three channels.
What counts as large text, and what about icons and borders?
"Large" is a size rule, not a vague feeling. WCAG defines large-scale text as at least 18 point, or at least 14 point bold. W3C notes that one point equals 1.333 CSS pixels, so that is about 24 px regular or 18.66 px bold [1]. Anything smaller, including most body copy, is normal text and needs 4.5:1.
Non-text parts have their own 3:1 rule. In practice that covers:
- the border of a text input, if the border is what shows where the field is
- the check mark in a checkbox, a menu arrow, or a play icon with no label
- selected, focused and pressed states, including focus indicators
- chart lines or bars the reader needs in order to understand the data
W3C also lists exemptions: disabled controls, decorative graphics, and logos [3]. Text placed inside an image still follows the text rule, not the 3:1 rule.
As a hypothetical example, take a light gray input border of #E6E5ED on a white form. The core math gives 1.25:1, so the box nearly disappears. A mid-gray border of #8A8A8A gives 3.45:1 and passes the non-text rule.
Why can't you round a contrast ratio up?
Because the thresholds are exact. W3C states in the Understanding documents that computed values must not be rounded, and gives 4.499:1 as an example that fails 4.5:1 [1]. WebAIM says the same: you cannot round a contrast ratio up to 4.5:1, and its example is #777777 on white at 4.47:1, which fails [4].
A ratio that looks like 4.5 after rounding can still be a failure. A calculator that rounds to one decimal would call 4.499 a pass. SwatchNest truncates instead, so what you read is a floor of the true value. We computed these with our own color core.
| Text color on white | RGB | HSL | Ratio | AA normal text |
|---|---|---|---|---|
| #767676 | rgb(118, 118, 118) | hsl(0, 0%, 46%) | 4.54:1 | Pass |
| #777777 | rgb(119, 119, 119) | hsl(0, 0%, 47%) | 4.47:1 | Fail |
| #946D6D | rgb(148, 109, 109) | hsl(0, 15%, 50%) | 4.49:1 | Fail |
| #6D46D3 | rgb(109, 70, 211) | hsl(257, 62%, 55%) | 6.05:1 | Pass |
The first two grays differ by a single step on every channel, yet one passes and one fails. The third row is the trap: its true ratio is 4.4992:1, so a rounded display would read 4.5 and mislead you.
Where do contrast ratios fall short?
Passing the ratio does not make a design readable on its own. Keep these limits in mind.
Hue does not help. The formula uses brightness only. Amber #F59E0B on white scores 2.14:1 and fails even the large-text bar, while the dark ink #17172F on the same amber scores 8.14:1. The amber is the same, only the partner color changed. The right text color depends on the background, which is why you check pairs and not single colors.
Gradients, photos and transparency are not defined. WebAIM points out that WCAG does not say how to measure them, and recommends testing the area where contrast is lowest. Lowering a color's opacity also lowers contrast, because the color underneath shows through [4]. If you place text over a gradient, check the lightest and darkest points the words touch.
Thin and tiny text is harder to read at the same ratio. The WCAG number is a minimum, not a guarantee. A hairline font at exactly 4.5:1 is harder to read than a sturdy one.
A newer method exists, but it is not a requirement. APCA is a proposed method in a working draft for a future WCAG version. WCAG 2.2 and its 4.5:1 and 3:1 thresholds remain what current guidelines refer to, so use the ratios above for compliance work.
Passing these tests does not settle accessibility as a whole. Contrast is one part of Level AA, next to keyboard use, text alternatives and more.
How do you fix a color that fails?
Change the lightness and keep the hue, so the brand feel survives. Say your accent pink #EC4899, hsl(330, 81%, 60%), is used for a small text link on white. It scores 3.52:1, enough for large text but not for body copy. The core's nearest-passing search keeps the same hue and darkens it to #D63187, hsl(329, 67%, 52%), which scores 4.51:1 and passes AA for normal text.
Small shifts go a long way. Moving lightness by a few points is usually invisible in a logo-sized swatch but decisive for small text, and the fix rarely changes how the color reads as pink, violet or blue. It is much easier to adjust a text token once than to redesign a page after an audit.
A short routine for any new palette:
- Pick the background first, then test every text and icon color against it.
- Use dark ink for body text. Our own ink, #17172F, scores 17.49:1 on white.
- Keep brand accents for large headings, buttons with dark labels, and decoration.
- Test text on tinted cards too: #17172F on a pale lilac #F1ECFD gives 15.13:1.
- Re-check hover, focus and disabled-looking states.
If you are building a full scheme, our website color schemes guide walks through roles and neutrals, and the palette generator lets you test pairs as you go. Muted sets, like the ones in our neutral palettes, often need the most careful checking. The HEX to HSL converter helps when you want to nudge lightness by a few points. British readers searching for "colour contrast" will find the same numbers: the standard is international.
Frequently Asked Questions
Is 4.5:1 or 3:1 good enough?
Use 4.5:1 for normal text and 3:1 only for large text (18 point, or 14 point bold) and for UI parts such as borders and icons. If you are unsure which applies, design to 4.5:1 and you cover both.
Does white text on a brand-color button need to pass?
Yes. Button labels are text, so normal-size labels need 4.5:1 against the button color. For example, white on #6D46D3 scores 6.05:1 and passes. Check the hover and focus colors as well.
Does a contrast ratio of 21:1 mean best?
Black on white is the maximum, but you do not need it. Many designers soften pure black slightly for comfort. The ink color #17172F at 17.49:1 on white is far above every threshold.
Our Take
We think the best habit is to treat 4.5:1 as the floor and design above it, not to chase the exact number. A pair that scrapes by at 4.51:1 leaves no room for a dimmer screen, a thin font or a tired reader. We also prefer that tools show truncated ratios, because a rounded 4.5 is a small lie that makes a failing color look safe. Use the checker early, when changing a color is still free, and keep brand accents for places where they do not carry the reading load. This is our opinion, not a WCAG rule, and it never replaces testing with real users.
Sources
Color values are shown in sRGB. Contrast results follow WCAG 2.x and do not cover every accessibility need. Spotted an error? Tell us.



