Start with the words people need to read

Choosing accessible colors is less about finding one perfect palette than making sure each piece of text remains distinguishable from what sits behind it. Begin with the text visitors will encounter most: body copy, headings, navigation, links, form labels, buttons, and error messages. A muted color that looks pleasant in a large heading may be difficult to read in a small paragraph.

Make a short list of the backgrounds those words actually use. Include cards, menus, banners, form fields, and any dark sections as well as the main page background. Check the text against its immediate background, not against the page’s overall color. If text sits on a tinted panel, that panel is the color that matters.

Use contrast ratios as a starting point

A contrast checker compares two colors and reports a ratio. For a practical baseline, aim for at least 4.5:1 for ordinary text and 3:1 for large text. Under WCAG guidance, large text means at least 18 points in regular weight or 14 points in bold weight—roughly 24 and 19 CSS pixels, respectively. When in doubt, use the ordinary-text target; labels and navigation items are often smaller than they first appear.

Enter the exact foreground and background color values into a contrast checker rather than judging them on your own screen. If a pair falls short, try darkening the text, lightening its background, or choosing a different pair altogether. Raising font weight can make text look clearer, but it does not change the measured contrast between the colors. Keep the checker's result beside your chosen colors so you do not have to repeat the decision for every new page.

Test colors in the places where they change

A palette can pass in a style guide and fail on a live page. A white button label might work on the default button color but become hard to see when the button is hovered over or disabled. A link color might pass on white but fail inside a pale callout. Check each meaningful state and setting: default and visited links, hover and keyboard focus states, buttons, form messages, and text on colored cards.

Images and gradients need extra care because the background behind the words can vary. An overlay may help, but check the lightest or busiest part of the image where text could appear, including at narrow screen widths. If that is difficult to control, place the text in a solid-color panel instead. Also check translucent colors against the final rendered background; the value written in a stylesheet may not be the color a visitor sees.

Remember what a ratio does not tell you

A passing contrast ratio is useful, but it does not guarantee that a page is easy to read. Very thin type, dense paragraphs, small text, and crowded spacing can still make reading tiring. Look at pages at normal and enlarged text sizes, on both light and dark sections, and ask whether the hierarchy remains clear without relying on subtle shades.

Color should not be the only way to convey meaning. Give links a visual cue beyond color when their purpose might otherwise be unclear, and pair error colors with text that explains the problem. Make keyboard focus easy to spot. Interactive controls and meaningful graphics can have contrast needs of their own, so do not stop after checking paragraph text.

Turn good choices into a small, reusable system

You do not need dozens of approved combinations. Choose a few reliable pairs, such as primary text on the main background, secondary text on cards, link text on each surface, and text on primary and secondary buttons. Record the color values and where each pair may be used. Avoid a vague instruction such as “use the brand gray,” which may lead someone to put light gray text on an equally light panel.

Then build or update a sample page containing a paragraph, heading, link, button, form field, notice, and image caption. Run contrast checks on those examples and review them at a narrow width and with text enlarged. Whenever you add a new color or component, compare it with the approved examples. This small routine makes accessible color choices easier to maintain as the website grows.

Back to category ↗