WCAG Contrast Checker
Test your colors against the WCAG 2.1 contrast rules for level AA and level AAA. See at a glance which text sizes and elements pass and which fail.
Check the contrast ratio between text and background colors and test WCAG AA and AAA instantly. Fast, free and no signup.
Large text sample
This is normal body text. The quick brown fox jumps over the lazy dog.
Button / UI elementChoose a text color and a background color, or type their HEX codes.
The contrast ratio and WCAG AA and AAA results update instantly.
If it fails, apply the suggested color and adjust it to your design.
Is your text easy to read on its background? Use this free color contrast checker to find out in one second. Enter a text color and a background color, and the tool calculates the contrast ratio and tells you if it passes WCAG AA and AAA for normal text, large text and user interface components. You also get a live preview of how the colors look together and, when the colors fail, a suggested color that passes. It works with HEX codes and color pickers, runs completely in your browser and needs no signup. It is a handy accessibility contrast checker for web designers, developers, UI and UX designers, marketers and students.
Test your colors against the WCAG 2.1 contrast rules for level AA and level AAA. See at a glance which text sizes and elements pass and which fail.
Check the contrast between text and background colors for websites, apps, presentations, banners and social media posts, with a live preview next to the result.
When your colors fail, the tool finds a close shade of your text color that reaches the target ratio, so you can fix the problem and keep your design style.
Color contrast is the difference in brightness between two colors, most often the color of text and the color behind it. The higher the contrast, the easier it is to read. Black text on a white background has the strongest contrast, while light gray text on a white background is hard to read for many people.
Good contrast helps everyone: people with low vision, people with color vision deficiency, older users, and anyone reading a screen in bright sunlight or on a cheap display.
The contrast ratio is a number from 1:1 to 21:1. A ratio of 1:1 means the two colors are the same, and 21:1 is the highest possible value, which is black on white. The ratio is calculated from the relative luminance of each color, which is a measure of how bright the color looks to the human eye.
The formula is: contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the luminance of the lighter color and L2 is the luminance of the darker color. You do not need to calculate it yourself, because this tool does it instantly as you change the colors.
The Web Content Accessibility Guidelines, known as WCAG, set the minimum contrast values used around the world for accessible websites. There are two main levels.
Most websites aim for level AA, which is also what many accessibility policies and procurement rules refer to. Level AAA is a higher goal that is not always possible for every part of a design.
WCAG treats text as large when it is at least 18 point (about 24 pixels) in regular weight, or at least 14 point (about 18.66 pixels) in bold. Large text is easier to read, so it can use a lower contrast ratio of 3:1 for AA. All smaller text is normal text and needs 4.5:1 for AA.
Web designers and developers use a contrast checker while building websites and design systems. UI and UX designers use it for apps, dashboards and buttons. Marketers and content creators use it for banners, ads, social media posts and presentations. Students and teachers use it to learn about accessibility. Business owners use it to make sure that their website text is readable for all visitors.
This online contrast ratio checker works in any modern web browser on desktop, tablet and mobile. All calculations run in your browser, so the colors you test are not uploaded or stored anywhere. There is nothing to install and no account to create. Bookmark the page, test your colors, and share the result link with your team or client.
Find answers to common questions about contrast ratios, WCAG AA and AAA, and how to make your colors accessible.
A color contrast checker measures the difference in brightness between two colors, usually a text color and its background color. The result is a contrast ratio from 1:1 to 21:1 that shows how easy the text is to read. Designers and developers use it to make websites and apps accessible.
Enter or pick a text color and a background color, using the color pickers or HEX codes. The contrast ratio and the WCAG results update instantly. You can also use the swap button to switch the two colors.
WCAG level AA requires a contrast ratio of at least 4.5 to 1 for normal text and at least 3 to 1 for large text. User interface components and graphical objects also need at least 3 to 1.
WCAG level AAA is stricter. It requires at least 7 to 1 for normal text and at least 4.5 to 1 for large text. AAA is a higher goal and is not always possible for every design.
Large text is text that is at least 18 point, which is about 24 pixels, in regular weight, or at least 14 point, which is about 18.66 pixels, in bold. Everything smaller is treated as normal text.
The ratio is calculated from the relative luminance of the two colors. Each color is converted to a luminance value between 0 and 1, and the ratio is the lighter luminance plus 0.05 divided by the darker luminance plus 0.05. Black on white gives the maximum ratio of 21 to 1.
For most body text the minimum for WCAG AA is 4.5 to 1. Large text and user interface components can use 3 to 1. Text that fails these values can be hard to read for people with low vision, color vision deficiency or in bright light.
Yes. WCAG 2.1 asks for at least 3 to 1 contrast for user interface components such as buttons borders, form fields, icons and charts, against their neighboring colors. The UI components result in this tool uses that 3 to 1 value.
WCAG makes an exception for logos and for text that is purely decorative or not visible. Everything that carries information or is needed to use the page should meet the contrast requirements.
Make the text darker or the background lighter, or the other way around, until the ratio reaches the target. This tool also suggests a close color that passes, which you can apply with one click and then adjust to match your brand.
Light gray text is a common problem. On a white background the lightest gray that still reaches 4.5 to 1 is about 767676, with a ratio of about 4.54 to 1. Anything lighter than that fails AA for normal text.
Yes. Enter your light text color and your dark background color and check the ratio. Dark mode needs good contrast too, and very bright text on a pure black background can also feel harsh, so check different shades.
No. Contrast is one important part of accessibility. You also need readable font sizes, clear layout, text alternatives, keyboard support and more. Use this tool together with other accessibility checks and real user testing.
Yes. The tool is completely free to use, with no signup. Everything runs in your browser and the colors you enter are not uploaded or stored.
Merge, split, compress and convert files in seconds. Explore everything in one place.
All Tools