Readable for everyone
About one in twelve men has some color vision deficiency, and many more people read screens in bright sunlight or with ageing eyes. The Web Content Accessibility Guidelines therefore set minimum contrast ratios: 4.5:1 for normal text and 3:1 for large text and interface elements at level AA, 7:1 and 4.5:1 at level AAA.
The ratio is calculated from the relative luminance of both colors exactly as WCAG 2 defines it. Use Swap to test light text on a dark background and back again, and pick a darker or lighter shade from the palette until the result passes.
Transparent colors
If the text color has transparency, it is blended with the background first, so the ratio matches what users actually see.