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

Text Color Selector

Pick any background color and instantly find the most readable text color, with a live WCAG contrast check. Fast, free and no signup.

  • 100% free
  • No Signup
  • WCAG AA & AAA check

Live preview

Aa
0:1
Contrast ratio

Readable headline text

This is a sample paragraph at normal size. Good contrast keeps long text comfortable to read on any screen, in any lighting.

Large text sample (24px)

Button label
Text color suggestions click one to use it
CSS code
ADVERTISEMENT
Demo Ad 728 x 90

How to choose a readable text color

1Pick the background

Choose your background color with the picker or type a HEX code.

2Get the best text color

See the most readable text color or test your own and auto-fix it.

3Copy the CSS

Check the WCAG result, then copy the color codes or ready-made CSS.

TEXT READABILITY GUIDE

Text Color Selector – Find the Best Text Color for Any Background Color Online Free

Choosing a text color sounds simple until a heading disappears into its background, a button label turns into a blur or a client tells you the page is "hard to read on my phone". A text color selector removes the guesswork. Our free text color selector takes any background color you pick, calculates how readable different text colors are on top of it, and shows you the best choice in one click, together with the exact contrast ratio and a clear pass or fail result for the WCAG accessibility levels AA and AAA. You can let the tool pick the best text color automatically, try your own color and watch the ratio update live, or press Auto-fix to nudge a color you love just far enough to become readable without changing its hue. There is no software to install, no account to create and no limit on how many color combinations you test. Designers use it to check brand colors, developers use it to pick accessible text and button colors for CSS, content creators use it to make social graphics and slides legible, and students use it to learn how contrast really works. In a few seconds you get a trustworthy answer to the question "what color text should I use on this background?" and ready-to-paste CSS to go with it.

Best Text Color for Any Background

Enter any background color and the selector instantly recommends the most readable text color, either pure black and white or a softer tinted version that matches the hue of your background. It compares every candidate by contrast ratio, so the answer is based on math rather than opinion.

Text and Background Contrast Checker

See the exact contrast ratio between your text color and background color, plus pass or fail results for normal text, large text and user interface components at both AA and AAA levels, so you know right away whether a combination is accessible.

Auto-Fix Low Contrast Text Colors

If your favorite text color fails the test, Auto-fix adjusts only its lightness until it reaches your target ratio. The hue and saturation stay the same, so the color still feels like part of your brand while becoming comfortably readable.

How to Use the Text Color Selector (Step by Step)

Finding a readable font color for a background takes less than a minute. Follow these simple steps whether you are styling a website, an email, a presentation slide or a social media graphic.

  1. Choose your background color: Click the color box to open the picker, type a HEX code such as #4F46E5, or press Random background for ideas.
  2. Pick a target contrast level: Select AA for normal text (4.5:1), AA for large text (3:1) or AAA for normal text (7:1), depending on how strict you need to be.
  3. Let the tool choose, or use your own: Keep Auto (best) to get the most readable text color, or switch to Custom, enter your own text color and see the ratio change live.
  4. Fix or compare: Press Auto-fix to adjust a failing custom color, or click any suggestion chip to try that text color on your background.
  5. Copy the result: Copy the CSS block or just the text HEX code, or use Swap colors to test the reverse combination.

The preview, the ratio and the pass or fail badges update instantly after every change, so you can compare many background and text combinations in a few minutes.

Why Choosing the Right Text Color Matters

Text is the main way a website, app or document communicates, and the color of that text decides whether people can actually read it. Low-contrast text tires the eyes, slows reading, hides important information and drives visitors away before they reach your message. It also affects a very large group of people. Aging eyes, mild vision impairment, color vision deficiency, a dim phone screen, bright sunlight on a train platform or simply a cheap monitor can all turn a "nice-looking" light grey paragraph into something unreadable. Good text color choices help everyone, not only people with a diagnosed disability, which is why accessibility guidelines treat contrast as one of the most basic requirements of any interface.

There is a practical business side as well. Pages that are easy to read keep visitors longer, forms with clear labels get completed more often, and buttons with legible text get clicked. In many countries, public sector sites and a growing number of commercial services must also meet accessibility standards that reference WCAG contrast rules, so checking your colors is a quick way to reduce legal and reputational risk.

How Text and Background Contrast Ratio Is Calculated

The contrast ratio is a number between 1 and 21 that describes how different two colors are in brightness. A ratio of 1:1 means the colors are identical, and 21:1 is the maximum, which is black text on a white background. The calculation uses relative luminance, a value from 0 to 1 that represents how bright a color appears to the human eye. First each red, green and blue channel is converted from its 0 to 255 value into a linear value, because screens do not respond to brightness in a straight line. Then the channels are combined using weights that reflect how sensitive the eye is to each one, with green counting for the most and blue for the least. Finally the ratio is calculated by adding 0.05 to the luminance of the lighter color, adding 0.05 to the luminance of the darker color and dividing the first number by the second.

This is the same formula defined by the Web Content Accessibility Guidelines, so the result of this selector matches what accessibility auditors and browser developer tools report. The table below lists the minimum ratios for each WCAG requirement.

WCAG contrast ratio requirements for text and interface elements
Content type Level AA Level AAA Example
Normal text 4.5 : 1 7 : 1 Body copy, captions, form labels
Large text 3 : 1 4.5 : 1 Headings of 24px or larger, bold text of 19px or larger
UI components and graphics 3 : 1 Not defined Input borders, icons, focus rings, chart lines
Logos and decoration No requirement No requirement Brand logos, purely decorative images

For most websites, aim for AA on all text as a minimum. If your audience includes older readers, or the text is long and important, such as articles, legal notices or instructions, aiming for AAA on body text is a worthwhile upgrade.

Black or White Text? How the Best Text Color Is Chosen

One of the most common questions in interface design is whether text on a colored background should be black or white. Many people assume that dark backgrounds always need white text and bright backgrounds always need black text, but the real answer depends on the luminance of the exact color, not on how "dark" it feels. Mid-tone colors are the tricky ones. Pure red, for example, looks like a strong color that should carry white text, yet black text actually has a higher contrast ratio on it. The selector tests both options, and in tinted mode it also tests a very dark and a very light version of your background hue, then recommends whichever scores the highest ratio. The table below shows a few well-known colors and their contrast ratios with white and with black text, calculated with the standard WCAG formula.

Contrast ratio of white and black text on common background colors
Background White text Black text Better choice
#FF0000 (red) 4.00 : 1 5.25 : 1 Black
#0000FF (blue) 8.59 : 1 2.44 : 1 White
#00FF00 (green) 1.37 : 1 15.30 : 1 Black
#FFFF00 (yellow) 1.07 : 1 19.56 : 1 Black
#FFA500 (orange) 1.97 : 1 10.63 : 1 Black
#808080 (mid grey) 3.95 : 1 5.32 : 1 Black
#4F46E5 (indigo) 6.29 : 1 3.34 : 1 White

Notice that mid grey and red both favor black text, and that white text on pure red or mid grey does not even reach the 4.5:1 level required for normal text. Because intuition is unreliable in this middle range, a calculated answer saves you from shipping a design that looks fine on your monitor but fails an accessibility audit.

Dark Text on Light Backgrounds vs Light Text on Dark Backgrounds

Both approaches can be perfectly readable as long as the contrast ratio is strong, but they behave differently in practice. Dark text on a light background is the traditional choice for long reading because it matches printed paper and works well in bright environments. Light text on a dark background, often called dark mode, can look modern and reduce glare in dim rooms, yet pure white text on pure black can cause a slight glowing effect that some readers find tiring, especially with small type. A common refinement is to use an off-white such as a very light grey for text and a very dark grey or deep tinted color for the background. The Tinted suggestion style in this tool produces exactly this kind of softer pair, using a near-black or near-white that carries a hint of your background hue.

  • Long articles and documents: Dark text on a light background is usually the most comfortable choice.
  • Dashboards and night-time apps: Light text on a dark background reduces glare, but avoid pure white on pure black.
  • Small text: Increase contrast further for text below 14px, since thin strokes need more difference to stay sharp.
  • Both themes: If your site has a dark mode, test the text color in both themes separately.

Best Text Colors for Buttons, Links and Form Fields

Buttons and links deserve extra attention because they are the parts of a page where people take action. The label on a colored button counts as text, so it must reach at least 4.5:1 against the button color, or 3:1 if the label is large and bold. The button itself also needs a 3:1 ratio against the page background when its edge is the only thing that shows it is clickable. Links inside paragraphs should be distinguishable from surrounding text, and the usual safe practice is to underline them or give them a clearly different weight, instead of relying on a small color difference alone. For form fields, make sure the typed text, the placeholder text and the label all pass contrast checks, because faint placeholder text is one of the most frequent accessibility failures on the web.

  • Primary buttons: Test the label color against the exact button color and also against hover and pressed states.
  • Disabled buttons: These are exempt from strict requirements, but keep them recognisable so people understand why they cannot click.
  • Placeholder text: Make it dark enough to read, and never use it as a replacement for a real label.
  • Error and success messages: Check message text on its colored background, and add an icon so color is not the only signal.

Color Blindness, Low Vision and Readable Text

Roughly one in twelve men and one in two hundred women have some form of color vision deficiency, and many more people have reduced contrast sensitivity because of age, eye conditions or tired eyes. For these readers, brightness difference matters far more than hue difference. Two colors that look clearly different to you, such as a medium red and a medium green, can have almost the same luminance and become nearly indistinguishable when used for text and background. Because the contrast ratio is based on luminance, passing the WCAG check automatically protects most readers with color vision deficiency. As an extra safeguard, never use color as the only way to communicate meaning. Add underlines to links, icons to status messages and labels to chart segments so the information survives even in grayscale.

Where to Use a Text Color Selector: Websites, Emails, Slides and Graphics

Readable text matters anywhere words sit on a colored surface. On websites and apps it keeps navigation bars, cards, banners and hero sections legible. In HTML emails it is even more important, because you cannot control which device, screen brightness or dark mode setting the recipient uses. In presentations, text on a colored slide has to remain readable from the back of a room, where projector washout lowers contrast further. In social media graphics, thumbnails, posters and infographics, strong text contrast is what makes a post stop the scroll. Print designers and sign makers use the same principles for brochures, menus, packaging and wayfinding, where a poor color pair cannot be fixed with a browser refresh once it has been printed.

  • Website and app design: Pick accessible text colors for headers, cards, banners and call-to-action buttons.
  • Email templates: Choose text colors that stay readable in both light and dark email clients.
  • Slides and videos: Make titles and captions readable on any projector or small screen.
  • Posters, flyers and packaging: Test the exact color pair before sending a design to print.
  • Brand guidelines: Document approved text and background pairs with their contrast ratios.

Common Text Color Mistakes and How to Avoid Them

  • Light grey text on white: A very popular style, yet most light greys fall below 4.5:1, so darken them until the check passes.
  • Judging colors by eye on one screen: Your monitor, brightness and room lighting differ from your visitors', so rely on the measured ratio.
  • Placing text over images without an overlay: Text on photos changes contrast from one area to another, so add a solid or gradient overlay behind it.
  • Ignoring hover, focus and disabled states: Every state of a component needs its own contrast check.
  • Choosing pure white on a saturated brand color: As the table above shows, white text can fail on mid-tone colors, so test before you commit.
  • Forgetting dark mode: A color pair that passes in light mode can fail after the theme is inverted.

Using Your Text and Background Colors in CSS

Once you have a combination that passes, the tool generates a short CSS block with the background-color and color properties, plus matching custom properties you can reuse across your stylesheet. Paste the block into your stylesheet, replace the class name with your own, and the combination is ready to use. If you manage a larger design system, store the pair as variables, for example --surface and --on-surface, so that every component that uses a surface color also receives its matching readable text color automatically. This "on-color" pattern is used by many design systems because it makes accessibility a built-in property of each color instead of an afterthought.

You can also use the Swap colors button to test the reverse pair, for example when you want to use your text color as the background of a badge or banner, and check at once whether the reversed combination is still readable.

Free Text Color Selector for Any Device

This text color picker and contrast tool runs in your web browser on Windows, Mac, Linux, Android and iPhone, so you can check a color pair on the same phone where your visitors will see it. There is no signup, no watermark and no usage limit, and because the calculation happens on your device, your colors are never sent to a server. Whether you need the best font color for a dark blue header, a readable text color for a yellow banner or an accessible label color for a brand-new button, you can test, fix and copy the result in a few seconds.

Ready to try it? Scroll back up, choose a background color and see which text color works best. If you need other design and developer tools, explore the rest of the free tools on our site.

ADVERTISEMENT
Demo Ad 300 x 250
COMMON QUESTIONS

Text Color Selector FAQ

Quick answers about choosing readable text colors, contrast ratios and WCAG accessibility levels.

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

Enter your background color in the selector and keep Auto (best) turned on. The tool compares candidate text colors by contrast ratio and recommends the one that is easiest to read, together with its exact ratio and WCAG pass or fail result.

What is a good contrast ratio for text?

For normal text, WCAG level AA requires at least 4.5:1 and level AAA requires at least 7:1. For large text, the minimum is 3:1 for AA and 4.5:1 for AAA. The higher the ratio, the easier the text is to read for more people.

Should I use black or white text on my color?

It depends on the luminance of the exact background color, not how dark it looks. Very dark and deep blue or indigo colors usually suit white text, while yellow, green, orange and even pure red usually have a higher contrast ratio with black text. Use the selector to see the real numbers.

What does Auto-fix do to my text color?

Auto-fix keeps the hue and saturation of your text color and moves only its lightness, lighter or darker, by the smallest amount needed to reach your chosen target ratio. This way the color stays close to your original choice while becoming readable.

What is the difference between WCAG AA and AAA?

AA is the standard minimum level that most websites and legal requirements aim for, with a 4.5:1 ratio for normal text. AAA is a stricter, enhanced level with a 7:1 ratio for normal text, recommended for long reading material or audiences with low vision.

Does the tool check large text and buttons too?

Yes. Each combination is checked against normal text, large text and user interface component requirements at the AA and AAA levels, so you can see at a glance where a pair passes or fails, including for button labels and icons.

Is this text color selector free and private?

It is completely free, needs no signup and adds no watermark. All calculations happen in your browser, so your colors are never uploaded or stored on our servers.

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 →