How to Choose Accessible Button Colors Without Losing Brand Identity
Use contrast-aware button colors that still feel on-brand, clickable, and polished across light and dark interfaces.
Read GuideAccessibility
Check the contrast ratio of text and background colors against WCAG AA and AAA.
Accessibility
Use this color contrast checker to test any text and background pair against the WCAG accessibility guidelines in one view. It calculates the exact contrast ratio and shows pass or fail for all four standard thresholds: AA normal text at 4.5:1, AA large text at 3:1, AAA normal text at 7:1 and AAA large text at 4.5:1. A live mock page renders your colors as real headings and paragraphs, helping designers, developers and content teams catch unreadable combinations before launch.
When a pair fails, change lightness rather than hue: darkening the text or lightening the background moves the ratio far more than shifting the color around the wheel. Watch out for gray text on white, since popular grays like #999999 fall below 4.5:1, while #767676 is roughly the lightest gray that still passes AA on pure white. Remember that the swap button does not change the ratio, because contrast is the same in both directions; it only lets you preview how the reversed design reads.
FAQ
WCAG level AA requires at least 4.5:1 for normal text and 3:1 for large text, while level AAA requires 7:1 for normal text and 4.5:1 for large text. Ratios range from 1:1, which is the same color twice, up to 21:1 for black on white. Most websites aim for AA as a minimum.
Each color is converted to relative luminance, a measure of perceived brightness that weights green most heavily, then red, then blue. The ratio is the lighter luminance plus 0.05, divided by the darker luminance plus 0.05. The 0.05 accounts for ambient light reflecting off a screen.
WCAG treats text as large when it is at least 18 points, which is about 24px, at regular weight, or at least 14 points, about 18.66px, when bold. Large text only needs 3:1 for AA and 4.5:1 for AAA. Anything smaller must meet the normal text thresholds.
Yes. Logos and brand names in logos, purely decorative text, text in inactive or disabled controls and text that is part of a photo with other significant visual content are exempt. Everything users need to read or interact with, including links, labels and placeholder text, should meet the ratios.
Learn more
Use contrast-aware button colors that still feel on-brand, clickable, and polished across light and dark interfaces.
Read GuideFix inaccessible color palettes with clear contrast workflows and build interfaces everyone can enjoy.
Read GuideBuild an animated gradient in CSS with background-position keyframes, calm timing, prefers-reduced-motion support, GPU-friendly layers and @property angles.
Read Guide