Skip to content

Color Contrast Checker

Check the contrast ratio between text and background colors and test WCAG AA and AAA instantly. Fast, free and no signup.

  • 100% free
  • No Signup
  • Works in your browser

Choose colors

rgb(0, 0, 0)
rgb(255, 255, 255)
Quick examples

Large text sample

This is normal body text. The quick brown fox jumps over the lazy dog.

Button / UI element

How to check color contrast

1Pick colors

Choose a text color and a background color, or type their HEX codes.

2See the ratio

The contrast ratio and WCAG AA and AAA results update instantly.

3Fix if needed

If it fails, apply the suggested color and adjust it to your design.

COLOR CONTRAST GUIDE

Contrast Checker – Free WCAG Color Contrast Ratio Checker Online

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.

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.

Text and Background Contrast

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.

Get a Color That Passes

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.

What Is Color Contrast?

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.

What Is a Contrast Ratio?

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.

WCAG Contrast Requirements: AA and AAA

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.

  • AA normal text: at least 4.5:1. This is the common target for body text, labels and links.
  • AA large text: at least 3:1 for large headings and big text.
  • AAA normal text: at least 7:1, the enhanced level for the best readability.
  • AAA large text: at least 4.5:1.
  • UI components and graphics: at least 3:1 for button borders, form fields, icons and important parts of charts against nearby colors.

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.

What Is Large Text in WCAG?

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.

How to Use This Contrast Checker

  1. Enter your text color: Use the color picker or type a HEX code such as #1F2937 or just 1F2937. Short codes like #333 work too.
  2. Enter your background color: Do the same for the background. Use the swap button if you want to reverse the two colors.
  3. Read the result: The big number is the contrast ratio. The list below shows Pass or Fail for each WCAG requirement.
  4. Check the preview: The preview shows large text, normal text and a button with your colors, so you can judge readability by eye as well.
  5. Fix failing colors: If the colors fail, use the suggested color, then fine tune it. You can copy the ratio or share the exact color pair with a link.

Common Contrast Examples

  • Black on white (#000000 on #FFFFFF): 21:1, the maximum possible contrast.
  • Gray #767676 on white: about 4.54:1. This is the lightest neutral gray that still passes AA for normal text on a white background.
  • Light gray text on white: often below 3:1 and fails, even if it looks stylish.
  • White text on a mid blue or bright color: can fail on bright backgrounds, so check the exact shade of your buttons and banners.

Tips for Accessible Color Combinations

  • Test every text and background pair: Check body text, headings, links, buttons, placeholders, error messages and footer text.
  • Do not depend on color alone: Use icons, underlines or labels as well, so that people who cannot see color differences still get the message.
  • Be careful with text on images: Use an overlay or a solid background behind the text to keep the contrast stable.
  • Check hover, focus and disabled states: They also need clear contrast where they carry information.
  • Test dark mode separately: A color pair that works in light mode may not work on a dark background.
  • Add real user testing: A passing ratio is a strong start, but readability also depends on font, size, spacing and the screen.

Who Needs a Contrast Checker?

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.

Free Online Contrast Checker Without Installing Software

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.

COMMON QUESTIONS

Frequently Asked Questions About Color Contrast

Find answers to common questions about contrast ratios, WCAG AA and AAA, and how to make your colors accessible.

What is a color contrast checker?

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.

How do I check the contrast between two colors?

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.

What is the contrast ratio for WCAG AA?

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.

What is the contrast ratio for WCAG AAA?

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.

What counts as large text in WCAG?

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.

How is the contrast ratio calculated?

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.

What is the minimum contrast ratio for accessibility?

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.

Does the contrast checker work for buttons and icons?

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.

Do logos and decorative text need to meet contrast rules?

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.

What can I do if my colors fail the contrast check?

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.

Is gray text on white background accessible?

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.

Can I use this tool for dark mode design?

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.

Does a high contrast ratio guarantee accessibility?

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.

Is this contrast checker free?

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.

Need more free tools?

Merge, split, compress and convert files in seconds. Explore everything in one place.

All Tools