Accessibility and color contrast in UX design: best practices for text, controls, charts, and focus states

Lynn Martelli
Lynn Martelli

Color helps create hierarchy, communicate status, support branding, and draw attention to important actions. Those benefits disappear when text is hard to read, a chart depends on red versus green, or keyboard focus blends into the background.

Accessibility is therefore not a separate palette added at the end; it is part of deciding how color works in the interface.

The practical starting point is WCAG 2.2, combined with testing in the finished design. A color pair may pass a calculator and still fail in use because it sits over an image, changes on hover, or becomes unclear in a disabled or selected state.

Accessibility and color contrast in UX design start with measurable thresholds

  • For WCAG 2.2 Level AA, normal text needs a contrast ratio of at least 4.5:1 against its background.
  • Large text needs at least 3:1; WCAG defines large-scale text as at least 18 point, or 14 point when bold.
  • Logos, decorative text, and text in inactive controls have specific exceptions, but those exceptions should not become design targets.
  • Measure every real foreground-background combination, including text on gradients, images, cards, banners, and error messages.
  • Placeholder text also needs to remain readable when it communicates information.
  • Test at the smallest permitted type size and weight, since a passing headline does not prove that a caption passes.
  • Testing only the brand palette says little about how the colors behave once opacity, overlays, and component states are involved.

Accessibility in UX design goes beyond readable text

Accessibility in UX design also covers controls and graphical objects needed to understand or operate the interface. WCAG’s non-text contrast criterion sets a 3:1 minimum contrast ratio for adjacent colors for visual information such as input boundaries, icons, and meaningful chart elements.

A control does not necessarily need a visible border if its shape and function remain identifiable another way, but a faint gray outline on white is a common failure.

Ergomania’s guide to color psychology in UX design also notes that contrast can improve readability and support more accessible interfaces. Still, color cannot be the only way to communicate meaning.

Pair an error color with explanatory text and an icon: combine a selected tab color with shape, weight, or an indicator line. For inline links, underlining is often the clearest solution and avoids asking users to distinguish subtly different blues.

Color contrast in UX design must cover every control state

Color contrast in UX design should be checked for default, hover, focus, active, selected, error, success, and disabled states. Text inside a button needs its own contrast check, separate from the button boundary against the page. A hover color that looks elegant in a design file can accidentally lower label contrast or remove the only visible boundary.

Context also shapes perception: the same accent can signal a primary action, a warning, or a brand cue depending on placement and accompanying language.

UX colors: best practices for charts and data displays

UX and color use best practices for charts begin with redundant encoding.

  • Use labels, patterns, symbols, line styles, or direct annotations so that a reader does not need color perception alone to identify a series or status.
  • Check contrast between meaningful adjacent segments, not only between the chart and the page background.
  • Avoid large legends that force readers to remember a color while scanning back and forth. Direct labels are often easier.
  • Also test common color-vision deficiencies and grayscale, but remember that simulators are screening tools rather than substitutes for research with people who have relevant access needs.

UX accessibility best practices for focus states

UX accessibility best practices require a visible keyboard focus indicator.

WCAG 2.2 Level AA requires focus to be visible, while non-text contrast applies to authored indicators against adjacent colors.

The Level AAA Focus Appearance criterion adds a stronger benchmark: an area at least equivalent to a 2 CSS-pixel perimeter and a 3:1 contrast change between focused and unfocused states.

A two-color focus ring can remain visible on both light and dark backgrounds. Test it while moving through the interface by keyboard, including inside menus, dialogs, sticky headers, and components with their own selected state. Do not remove the browser outline unless an equally clear replacement is provided.

Turn contrast checks into a repeatable UX design practice

Define accessible color tokens for text, surfaces, borders, status messages, charts, and interaction states, then document permitted combinations. Automated checks can catch many ratio failures, but manual review is still needed for meaning, focus visibility, overlays, and color-only communication.

The goal is not to drain personality from the interface. It is to use color deliberately while ensuring that information and controls remain perceivable under real conditions.

When contrast is built into components and tested early, accessibility becomes routine rather than a last-minute repair.

Share This Article