Palette Handoff

How to use a brand color for accessible UI text

Pick a solid brand hex. The preview uses it on white and dark charcoal surfaces. If the source misses a 4.5 to 1 text contrast ratio, the generator mixes it toward the theme ink until it reaches the threshold. The button uses white or black text, whichever has greater contrast.

The ratio uses relative luminance in sRGB. A ratio of 4.5 to 1 is the WCAG AA minimum for normal text. The table checks only the four specified opaque color pairs. Test your actual components, focus states, images and other backgrounds separately.

Read the W3C explanation