Skip to content
⚠ TESTING ENVIRONMENT You are viewing a testing copy of Tolioo. Changes here do not affect the live website.

Accessible Text Color Generator

Enter a background color and instantly get readable, WCAG-compliant text colors. Check contrast ratios, fix failing text colors and copy the HEX code. Fast, free and no signup.

  • 100% free
  • No Signup
  • WCAG AA and AAA

Live preview

Readable text on any background

This paragraph shows normal body text. Good contrast keeps your content easy to read for everyone, including people with low vision, on small phone screens and in bright sunlight.

Small print, captions and helper text need strong contrast too.

Button label
0:1
Contrast ratioBetween your text and background color

Accessible text color suggestions

Colors that meet your target on this background. Click a card to use it as your text color.

CSS for the current colors


            
        
ADVERTISEMENT
Demo Ad 728 x 90

How to find an accessible text color

1Enter a background

Pick the background color of your button, banner, card or page.

2Choose a level

Select WCAG AA or AAA for normal or large text.

3Copy the text color

Use a suggested color or fix your own, then copy the HEX or CSS.

WCAG COLOR CONTRAST GUIDE

Accessible Text Color Generator: Find the Best Readable Text Color for Any Background (WCAG AA and AAA)

Have you ever picked a beautiful background color for a button, banner or website section and then struggled to find a text color that is actually easy to read? Our free accessible text color generator solves that problem in one step. Enter any background color and the tool instantly finds the best text color for that background, shows the exact contrast ratio and tells you whether the combination passes WCAG AA or WCAG AAA for normal text, large text and user interface components. It works as a text color generator, a color contrast checker and a color contrast fixer in one page: if your current text color fails, the tool adjusts its lightness by the smallest possible amount until it reaches the contrast ratio you need, so your design keeps its style while becoming readable. You can also get the best black or white text color for any background, a text color tinted to match your background hue and a neutral gray that just passes. There is no signup, no software to install and no limit, and all calculations run in your browser, so your colors are never uploaded. Whether you are a web designer building an accessible website, a developer checking button contrast, a UI designer creating a design system or a content creator choosing readable text for slides and social posts, this readable text color generator helps you make colors that everyone can read.

Best Text Color for Any Background

Not sure whether to use black or white text on your background? The generator calculates the contrast of both and recommends the one with higher contrast, then also offers tinted and neutral alternatives so you are not limited to pure black or pure white.

WCAG Contrast Ratio Checker

See the exact contrast ratio between text and background and check it against WCAG AA normal text (4.5:1), AA large text (3:1), AAA normal text (7:1), AAA large text (4.5:1) and non-text UI components (3:1) in a single glance.

Fix Low Contrast Text Colors

Already have a brand text color that fails the contrast check? Enter it and the tool nudges its lightness just enough to pass, keeping the same hue and saturation so the color still feels like your brand.

What Is an Accessible Text Color?

An accessible text color is a text color that has enough contrast against its background to be read comfortably by as many people as possible. This includes people with low vision, color vision deficiency or age-related vision changes, but it also includes everyone who reads on a small phone screen, in bright sunlight, on a low-quality monitor or at the end of a long day. Accessibility is not only about people with disabilities. Good text contrast improves readability, reduces eye strain and helps visitors understand your content faster, which is why accessible design usually improves usability, engagement and conversions for every visitor.

The most widely used standard for measuring text readability on screens is the Web Content Accessibility Guidelines, known as WCAG, published by the World Wide Web Consortium (W3C). WCAG defines minimum contrast ratios between foreground text and background color. Many accessibility laws and procurement policies around the world refer to WCAG, so passing its contrast rules is one of the most practical steps toward an accessible website, app or document.

How to Find a Readable Text Color for a Background (Step by Step)

You do not need to calculate luminance or memorize formulas. Follow these steps to find an accessible text color online in under a minute.

  1. Enter your background color: Use the color picker or type a HEX code such as #4F46E5. Three-digit codes like #F80 also work.
  2. Choose your WCAG target: Select AA for normal text (4.5:1) in most cases, AA for large text (3:1) for headings, or AAA (7:1) when you want maximum readability.
  3. Review the suggestions: The tool shows the best black or white text color, a text color tinted to match your background, your own text color adjusted to pass and the lightest neutral gray that passes.
  4. Check the live preview: See headings, body text, small print and a button on your background before you commit.
  5. Copy the result: Click a card to use that color as your text color, then copy the HEX code or the ready-made CSS.

If you want inspiration, press Random background to test different backgrounds and see how the suggested text colors change. Use Swap colors to see what happens when your text and background trade places, which is handy for creating inverted sections or dark mode variations.

WCAG Contrast Ratio Requirements: AA vs AAA

WCAG measures contrast as a ratio from 1:1 (no contrast, for example white on white) to 21:1 (maximum contrast, black on white). The higher the number, the easier the text is to read. The table below summarizes the minimum ratios for each conformance level and content type.

WCAG color contrast ratio requirements
Content type Level AA Level AAA
Normal text (body copy, labels, captions)4.5:17:1
Large text (24px or 18.66px bold and bigger)3:14.5:1
UI components and graphics (icons, input borders, focus rings)3:1Not specified
Logos and purely decorative textNo requirementNo requirement

Level AA is the target most organizations aim for and the one most accessibility policies require. Level AAA is stricter and is not always achievable for every design, but it is excellent for long reading content, forms, documentation and any audience that may include older adults or people with low vision. When you can reach AAA without hurting your design, it is worth doing.

How Contrast Ratio Is Calculated: Relative Luminance Explained

The WCAG contrast formula compares the relative luminance of two colors, which is a measure of how bright each color appears to the human eye. Relative luminance is calculated as L = 0.2126 R + 0.7152 G + 0.0722 B, where R, G and B are the red, green and blue channels after converting them from the standard sRGB range to linear light. Green gets the highest weight because our eyes are most sensitive to it, and blue gets the lowest. The contrast ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker color. The extra 0.05 accounts for ambient light and prevents division by zero when a color is pure black.

This is the formula used by this accessible text color generator, so its results match the contrast values you will see in browser developer tools, Figma plugins, Lighthouse audits and most WCAG testing tools. Newer contrast methods such as APCA are being researched for future guidelines, but the WCAG 2 ratio is still the standard referenced by laws, audits and design systems today.

Common Text and Background Color Combinations That Fail (and Pass)

Many popular color combinations look fine on a designer's monitor but fail the contrast check. Here are some well-known examples with their exact contrast ratios, so you can see how easily readability can slip.

Example contrast ratios for common color pairs
Text color Background Contrast ratio AA normal text
Black #000000White #FFFFFF21:1Pass
Gray #767676White #FFFFFF4.54:1Pass (barely)
Gray #808080White #FFFFFF3.95:1Fail
White #FFFFFFRed #FF00004.00:1Fail
Black #000000Red #FF00005.25:1Pass
White #FFFFFFOrange #FFA5001.97:1Fail
Black #000000Orange #FFA50010.63:1Pass
White #FFFFFFBlue #0000FF8.59:1Pass

Notice a pattern: white text on bright, light or mid-tone backgrounds such as orange, yellow, light green and many reds often fails, while black text on the same colors passes comfortably. That is why the first suggestion in this tool is always the stronger of black or white. Light gray text on white is another very common failure, and it is the main reason so many websites feel hard to read.

Large Text vs Normal Text: What Counts as Large in WCAG?

WCAG allows a lower contrast ratio for large text because bigger letters are easier to recognize. Text counts as large when it is at least 18 point (about 24 CSS pixels) in regular weight, or at least 14 point bold (about 18.66 CSS pixels bold). Everything smaller is normal text and needs the higher ratio. When you are not sure, treat your text as normal and aim for 4.5:1, because body paragraphs, form labels, menu items, captions and button labels are almost always normal text.

  • Headlines and hero titles: Often large text, so 3:1 may be enough for AA, but higher is always better.
  • Body text and paragraphs: Normal text, aim for at least 4.5:1 and consider 7:1 for long reading.
  • Button and link text: Usually normal text, check it against the button background and aim for 4.5:1.
  • Placeholder and helper text: Still text, so it needs 4.5:1 too, even when it is meant to look subtle.

Tips for Choosing Accessible Text Colors in Web Design and UI

  • Check contrast early: Test text and background colors while you create your color palette, not after the design is finished.
  • Prefer off-black and off-white: Very dark gray and soft white are often easier on the eyes than pure black on pure white while still passing easily.
  • Test buttons and states: Check normal, hover, focus and disabled states, and make sure link text is distinguishable inside paragraphs.
  • Be careful with text on images: Add a solid overlay or a dark gradient behind text so the contrast stays high wherever the image is bright.
  • Do not rely on color alone: Use icons, underlines or labels to show errors, required fields and links so color is never the only signal.
  • Test dark mode separately: A text color that passes on a light background may fail on a dark one, so check both themes.
  • Use real devices: Check important pages on a phone outdoors or at low brightness to see how contrast behaves in the real world.

Accessible Colors, Legal Requirements and SEO Benefits

Accessible color contrast is not only a design best practice. Accessibility regulations and standards in many countries, including laws and policies for public sector websites and, increasingly, private businesses, point to WCAG as the technical benchmark. Meeting the contrast requirements helps reduce accessibility complaints and makes your website usable to a larger audience. It also tends to improve general website quality: readable text lowers bounce rates, supports longer time on page and gives visitors a better experience on mobile, which are all signals that contribute to a healthy, high-performing website. Tools such as Lighthouse and many accessibility audits flag low contrast text, so fixing it early saves time later.

Who Uses an Accessible Text Color Generator?

Web designers and UI designers use it to choose readable text colors for buttons, banners, cards and navigation. Front-end developers use it to verify CSS color pairs before shipping, and accessibility specialists use it to prove that colors meet WCAG. Brand and marketing teams use it to keep social posts, presentation slides, email templates and landing pages readable. Students and teachers use it to learn how contrast works, and small business owners use it to make menus, flyers and online shops easier to read without hiring a designer.

Free Text and Background Color Contrast Tool: Works on Any Device, No Software Needed

This online accessible text color generator works in any modern browser on Windows, Mac, Linux, Android and iPhone. There is nothing to download, no account to create and no limit on how many color pairs you can test. Your colors stay on your device and are never sent to a server. If you also need to build a full palette, find opposite colors or export CSS variables, explore the other free color tools on our website.

Ready to make your text readable? Scroll back up, enter your background color, choose AA or AAA and copy your accessible text color in seconds.

ADVERTISEMENT
Demo Ad 300 x 250
COMMON QUESTIONS

Accessible Text Color Generator FAQ

Quick answers about readable text colors, WCAG contrast ratios and fixing low contrast text.

How do I find the best text color for a background color?

Enter your background color in the tool and choose your target level, such as WCAG AA for normal text. The generator suggests the stronger of black or white, a text color tinted to match your background, and a neutral gray, each with its exact contrast ratio. Pick the one that fits your design and copy the HEX code.

What contrast ratio do I need for accessible text?

For WCAG AA, normal text needs at least 4.5 to 1 and large text needs at least 3 to 1. For WCAG AAA, normal text needs 7 to 1 and large text needs 4.5 to 1. User interface components such as icons and input borders need at least 3 to 1 against their surroundings.

Why does white text fail on some colored backgrounds?

White text needs a fairly dark background to reach 4.5 to 1. On bright or mid-tone colors such as orange, yellow, light green and pure red, white text often falls below the limit, while black text on the same background passes easily. Always check the actual ratio instead of trusting how the colors look.

Can this tool fix my existing text color so it passes WCAG?

Yes. Enter your background and your current text color, then choose a target level. The tool keeps your text color's hue and saturation and changes its lightness by the smallest amount needed to reach the target, so the adjusted color stays as close as possible to your original.

What counts as large text in WCAG?

Large text is at least 18 point, which is about 24 CSS pixels, or at least 14 point bold, which is about 18.66 CSS pixels bold. Anything smaller is normal text and needs the higher contrast ratio. When you are unsure, treat the text as normal.

Do I need to check contrast for dark mode too?

Yes. A text color that passes on a light background can fail on a dark one, and the reverse is also true. Enter your dark mode background in the tool and check or fix the text color separately for each theme.

Is this accessible text color generator free and private?

Yes. It is free, needs no signup and has no usage limit. All calculations happen inside your browser, so the colors you enter are not uploaded, saved or stored by our website.

ADVERTISEMENT
Demo Ad 320 x 50

All Tools, One Place

Merge, split, compress and convert files in seconds. Explore powerful free tools for all your everyday needs.

Explore All Tools →