Colors
Accessible Color Pair Generator
Used by developers, writers, and creators worldwide.
The accessible color pair generator creates foreground and background combinations that pass WCAG 2.1 AA contrast standards — no manual testing required. Each pair meets the 4.5:1 minimum ratio for normal body text, so you can paste hex values straight into a stylesheet or Figma token file without running a separate audit. Choose from light backgrounds for document-style UIs, dark backgrounds for dashboards and night modes, or colorful palettes for branded components where neutral text feels off. Generate up to a dozen pairs at once to compare options side by side. Contrast failures caught in design cost far less to fix than ones found after launch.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Select a Color Style — Light, Dark, or Colorful — to match your interface's background context.
- Set the Number of Pairs to how many options you want to compare; 6 is a good starting point for design decisions.
- Click Generate to produce a list of foreground and background hex pairs, each confirmed to meet WCAG AA contrast.
- Review the pairs visually and note the contrast ratio displayed alongside each result.
- Copy the hex values directly into your CSS variables, design tokens, or Figma color styles.
Use Cases
- •Seeding accessible text color tokens into a Figma or Tokens Studio design system
- •Picking button label colors that pass AA contrast against a specific brand background
- •Building a dark-mode palette with guaranteed readable text for a Next.js dashboard
- •Comparing generated compliant pairs against current Tailwind color values during an audit
- •Generating colorful accessible pairs for a university portal's branded UI components
Tips
- →Generate one batch per style (Light, Dark, Colorful) and place them side by side to build a full accessible palette in one session.
- →If a colorful pair matches your brand hue but not your exact brand color, use it as a contrast-safe reference and adjust saturation carefully while re-checking the ratio.
- →For button states (default, hover, focus), generate multiple pairs in the same style and assign the highest-contrast pair to the focus state.
- →Dark-style pairs work well as code block or terminal UI backgrounds; light-style pairs suit form labels and body copy.
- →Don't modify a copied hex value without re-testing — shifting lightness by even 5% can push a 4.6:1 ratio below the 4.5:1 threshold.
- →When building a design system, tag each generated pair with its contrast ratio as a token annotation so developers can filter by ratio without re-testing.
FAQ
what contrast ratio do I need to pass WCAG AA vs AAA
WCAG AA requires 4.5:1 for normal text and 3:1 for large text (18pt or 14pt bold). AAA tightens those to 7:1 and 4.5:1 respectively. Most legal mandates — including Section 508 in the US and EN 301 549 in Europe — reference AA as the minimum bar.
are these color pairs safe for colorblind users
WCAG contrast ratios measure luminance difference, not color distinction, so passing 4.5:1 does not guarantee the pair is distinguishable to someone with deuteranopia or protanopia. A dark green on black can pass contrast while appearing nearly identical to a colorblind user. For colorblind safety, verify hue difference separately using a tool like Coblis or Sim Daltonism.
what's the difference between the light, dark, and colorful style options
Light style pairs use pale or white backgrounds with dark foregrounds, suited for default-theme or document UIs. Dark style pairs use deep backgrounds with light text, ideal for night modes or analytics dashboards. Colorful style pairs use saturated mid-range colors on both sides while still hitting the 4.5:1 threshold, useful for branded components where pure black or white text looks flat.