Enter your brand color. You'll get a scale of eleven tints and shades of it, with the WCAG contrast of each against white and black, which text color is readable on each, and code to copy. Your color is marked in the scale.
AA = 4.5:1 for normal text. AA large = 3:1, for text at least 24px, or 18.66px bold, and for icons and input borders. AAA = 7:1.
Text on a background from the same scale, for tinted cards, badges and alerts. Each row lists the darkest light step and lightest dark step that still pass 4.5:1.
Steps are made by changing lightness in HSL while keeping your hue and saturation, then measured with the WCAG 2.2 formula. The ratios are exact; the shades are a starting point you can adjust. For the rules behind the numbers, see WCAG contrast ratio explained.
ContrastForge scans every text element on a page, handles transparent layers and gradients, suggests the nearest passing color for each failure, and exports an audit report. Checking a pair and five full-page scans a month are free.
See ContrastForgeRelated: contrast checker · WCAG 2.2 AA checklist · how to do an accessibility audit.