Color Contrast Ratio and Accessibility: WCAG Levels, Relative Luminance, and Readable Palettes
When the contrast between text and background is too low, some people simply cannot read your content. This article explains what color contrast ratio is, the WCAG thresholds of 4.5:1, 3:1, and 7:1, how relative luminance works, why it matters, how to design for color vision diversity, and how to build palettes that are easy for everyone to read.
Have you ever looked at a website where pale gray text sits on a white background and felt that it was "somehow hard to read"? The cause is usually a lack of contrast ratio between the text color and the background. Contrast is not just a matter of visual taste; it is a foundational element of accessibility that determines whether every kind of user—people with low vision, older adults, people looking at a glaring screen outdoors—can read the information at all. This article explains, step by step, what contrast ratio is, how to measure it, and which thresholds you should meet.
What Contrast Ratio Is
A contrast ratio is a number that expresses the difference in brightness between two colors, usually a text color and a background color. It ranges from 1:1 to 21:1, where 1:1 means identical brightness that cannot be told apart, and 21:1 means the maximum difference of black against white. The larger the number, the more clearly the text and background separate, making it easier to read.
What matters here is that contrast is determined almost entirely by the difference in brightness, not by hue (whether a color is red, blue, and so on). For example, a red and a green of similar brightness may look strikingly different, yet because their brightness is close, the contrast ratio is low and some people struggle to tell where one ends and the other begins. Conversely, a dark color paired with a light one can secure high contrast even if the hues look plain.
Rather than judging by feel, it is far more reliable to confirm with a number whether your design has enough contrast. Enter your text and background color codes into the Color Contrast Checker to instantly measure the ratio of your current palette.
Relative Luminance and How the Ratio Is Calculated
The contrast ratio is calculated from each color's relative luminance. Relative luminance is a value that expresses the "brightness" perceived by the human eye on a scale from 0 (the darkest black) to 1 (the brightest white). Rather than simply adding the RGB components, it weights them to match the fact that the human eye is most sensitive to green and least sensitive to blue.
Contrast ratio = (lighter color's relative luminance + 0.05) / (darker color's relative luminance + 0.05)
The "+0.05" in this formula is a correction that accounts for ambient light reflecting off the screen. The calculation itself is a bit complex, but you only need to remember these two points:
- The bigger the brightness difference, the larger the ratio: white and black give the maximum 21:1.
- Brightness matters more than hue: even with different hues, like red and green, the ratio is low if the brightness is close.
Fortunately, there is no need to do this by hand in practice. Using a tool that automatically computes the ratio from relative luminance the moment you enter color codes lets anyone get an accurate value instantly.
WCAG Thresholds: 4.5:1, 3:1, and 7:1
As for how much contrast is enough, the international guidelines for web accessibility, the WCAG (Web Content Accessibility Guidelines), define concrete thresholds. The numbers worth memorizing are as follows.
| Level | Applies to | Required contrast ratio |
|---|---|---|
| AA (normal text) | Body text and other small text | 4.5:1 or higher |
| AA (large text) | About 24px or larger, or bold at about 19px+ | 3:1 or higher |
| AAA (normal text) | A higher level of conformance | 7:1 or higher |
| Non-text | Icons, input field borders, charts, etc. | 3:1 or higher |
AA's 4.5:1 is the baseline you should meet for body text. Many public agencies and corporate sites set AA conformance as their goal. The 3:1 for large text is a relaxed threshold based on the idea that large text, like headings, remains readable even with somewhat lower contrast.
AAA's 7:1 is a stricter, higher-level threshold. It is a level at which low-vision users can read more comfortably, and it is targeted in contexts where leaving no one behind is especially important, such as government, healthcare, and finance. It is also easy to overlook that non-text elements must meet 3:1, including button borders, form input fields, and chart colors.
Why Contrast Matters
Securing contrast is not a courtesy for a small minority alone. It helps a wide range of users and situations.
1. Everyone sees differently
Eyesight declines with age, and as the lens yellows, distinguishing colors becomes harder. For people with low vision or cataracts, low-contrast text becomes a literal barrier they "cannot read." In an aging society, the affected users are by no means few.
2. The environment can cause "hard to see" too
Even people with normal vision suddenly cannot read low-contrast content when looking at a smartphone in direct sunlight, when screen brightness is turned down, or when using an inexpensive display. Sufficient contrast protects users from this kind of situational difficulty as well.
3. Compliance with laws and guidelines
In Japan, JIS X 8341-3, and abroad, various national accessibility laws reference WCAG, and AA conformance is becoming a de facto requirement for public agencies and companies of a certain size. Securing contrast is a first step toward meeting these demands.
Designing for Color Vision Diversity
People perceive color differently, and it is said that about 1 in 20 men has a color vision characteristic (color vision diversity) that makes certain color combinations hard to distinguish. The most common type sees red and green as similar, so expressions that carry meaning through color alone—"red means important, green means safe"—can fail to convey information to these users.
The basic countermeasure is to use cues other than color as well.
- Add shapes, symbols, or text: do not just make errors red; also add a "!" icon or the word "Error."
- Create brightness differences: since close brightness is hard to tell apart even with different hues, secure a solid difference in brightness.
- Use underlines or patterns: indicate links with an underline, not just color, and distinguish charts with patterns in addition to color.
You cannot tell from imagination alone how your palette looks to people with a color vision characteristic. By converting images or palettes in the Color Blindness Simulator to see the actual appearance, you can concretely find the places that rely on color alone. Doing both numeric contrast checks and color vision simulation brings you closer to a design that reaches more people.
How to Build a Readable Palette
Finally, here is a practical procedure for building a palette that is easy for everyone to read. Even without memorizing difficult theory, following this flow will keep you from going far wrong.
1. Decide by brightness difference first
We tend to think about palettes starting from hue, but readability hinges on the difference in brightness. Secure a clear brightness difference first, so text and background become a "dark color and a light color." If using a brand color directly for text makes it too pale, it helps to prepare a darker derived shade for text.
2. Verify contrast with numbers
Once you have a palette draft, always confirm with the Color Contrast Checker whether body text meets 4.5:1 or higher and large headings meet 3:1 or higher. The subjective sense that it "looks readable" cannot be trusted. If you fall below the threshold, make the text darker or the background lighter.
3. Check that you do not rely on color alone
Review whether you distinguish information by color alone for links, error messages, charts, required fields, and so on. Add aids such as underlines, icons, and labels, and finally confirm the real appearance with a color blindness simulator; this sharply raises the quality of your palette.
| Scene | Avoid | Recommended |
|---|---|---|
| Body text | Pale gray text (e.g. #aaa on #fff) | Dark gray or darker, securing 4.5:1 |
| Links | Distinguished by color only | Color plus an underline |
| Errors | Red text only | Red plus an icon plus text |
Contrast ratio and accessibility are not a difficult topic reserved for special people; they are the basics for delivering information reliably to every user. Start by measuring your current palette with the Color Contrast Checker, and confirm the appearance with the Color Blindness Simulator as needed. Making it a habit to check from both the numbers and the actual appearance is the shortest path to a readable design.
Please note that this article is intended to provide general information, and the applicable standards and legal requirements vary by country, industry, and time. When taking actual measures, make your decision after checking the latest official guidelines (such as WCAG) and relevant laws.
FAQ
What is a contrast ratio?
A contrast ratio is a number that expresses the brightness difference between two colors, such as text and background, on a scale from 1:1 to 21:1. 1:1 means identical, indistinguishable brightness, and 21:1 means the maximum difference of black against white. The larger the number, the more clearly the text and background separate. It is determined by brightness difference rather than hue.
What are the WCAG contrast ratio thresholds?
WCAG Level AA requires 4.5:1 or higher for normal text such as body copy, and 3:1 or higher for large text (about 24px+, or bold 19px+). The stricter AAA level requires 7:1 or higher for normal text. Non-text elements such as icons and input field borders also need 3:1 or higher.
How is the contrast ratio calculated?
You find each color's relative luminance (perceived brightness on a 0 to 1 scale) and compute (lighter + 0.05) / (darker + 0.05). Relative luminance is not a simple sum of RGB; it is weighted to match the eye being sensitive to green and less so to blue. No hand calculation is needed—a tool computes it automatically when you enter color codes.
How should I design for color vision diversity?
The basics are to not distinguish information by color alone and to add non-color cues such as shapes, symbols, and text. Add an icon or wording to red errors, indicate links with underlines, and distinguish charts with patterns. A color blindness simulator lets you check the actual appearance and find places that rely on color alone.
Do the Color Contrast Checker and Color Blindness Simulator send data to a server?
WAZA TOOLS' Color Contrast Checker and Color Blindness Simulator both run entirely in your browser, so the colors and images you enter are never sent to or stored on a server. They work on smartphones too, and you can use them as many times as you like, for free.