WebToolsPlanet
colorguide·6 min read

How to Choose Accessible Button Colors

Pick accessible button colors for labels, fills, borders, hover states, disabled states, and focus rings without flattening your UI.

Published 2026-05-15
Updated 2026-05-15
How to Choose Accessible Button Colors

Buttons are where color decisions become functional. The fill, label, border, icon, hover state, and focus ring all need enough contrast for people to recognize what action is available and what state it is in.

Choosing accessible button colors does not mean every button has to look harsh. It means testing the actual foreground and background pairs used in each state, then saving the combinations that work.

Start with the label color

A button label is text, so normal-size labels need at least 4.5:1 contrast for WCAG AA. If the label is large enough to qualify as large text, the AA threshold is 3:1, but most product buttons use compact text.

White text on a saturated brand color often looks correct but can fail if the brand color is too bright. In that case, darken the fill, use a darker accessible brand variant, or switch to a dark label on a lighter fill.

Check the button shape and state

The visible boundary of a button can matter as much as the label, especially for ghost buttons, outline buttons, icon buttons, and controls placed on tinted surfaces. Meaningful non-text boundaries should reach 3:1 against adjacent colors.

Hover, active, selected, disabled, and loading states should not be guessed from the default state. Small lightness changes can turn a passing color pair into a failing one.

  • Test label versus fill
  • Test outline or border versus page surface
  • Test icons, focus rings, and selected states separately

Use accessible variants instead of one brand swatch

A single brand swatch rarely works for every button job. Most systems need a stronger primary fill, a softer secondary fill, a clear danger state, and reliable neutral buttons for quiet actions.

Create button tokens around verified combinations, such as primary-fill plus primary-label, rather than independent colors. Pair-based tokens make it harder to accidentally combine colors that were never tested together.

Keep gradients and shadows from hiding contrast

Gradient buttons need extra testing because the background behind the label changes across the button. Check the label against the lightest and darkest stops that sit under the text, not just the average color.

Shadows can help separation, but they do not replace the need for sufficient contrast between the button surface, text, border, and page background.

Khushbu

Khushbu

Full-Stack Developer & Founder

I build tools I wish existed — fast, free, and private. Every tool runs in your browser because I believe your data should stay yours.