Accessible color palette generator
Turn one brand color into a set of text, link, button, border and focus colors that pass WCAG 2.2 AA contrast, for a light and a dark theme.
Runs in your browser. Nothing is sent to our servers.
Your brand color
Palette for #2b59c3
Works as is #2b59c3 can carry button text that reaches 4.5 : 1.
Brand scale
- 50
#f1f3f9 - 100
#e2e7f3 - 200
#c2ceeb - 300
#97aee3 - 400
#6286da - 500
#2e5fd1 - 600
#264da6 - 700
#203c7e - 800
#1a2e5b - 900
#131f39 - 950
#0d1321
Neutral scale (same hue, low saturation)
- 50
#f4f4f6 - 100
#e9eaed - 200
#d2d4db - 300
#b4b9c5 - 400
#9199ab - 500
#6e7891 - 600
#586074 - 700
#454b59 - 800
#343842 - 900
#22252a - 950
#151619
Light theme
| Use | Look | Colors | Ratio | Result |
|---|---|---|---|---|
| Body text on page backgroundNeutral 700 | Aa | #454b59 on #f4f4f6 | 7.95 : 1needs 4.5 : 1 | Pass |
| Body text on cardsNeutral 700 | Aa | #454b59 on #ffffff | 8.73 : 1needs 4.5 : 1 | Pass |
| Secondary textNeutral 600 | Aa | #586074 on #f4f4f6 | 5.72 : 1needs 4.5 : 1 | Pass |
| Link textBrand 500 | Aa | #2e5fd1 on #f4f4f6 | 5.20 : 1needs 4.5 : 1 | Pass |
| Button labelYour brand color | Aa | #ffffff on #2b59c3 | 6.32 : 1needs 4.5 : 1 | Pass |
| Input borderNeutral 500 | #6e7891 on #f4f4f6 | 4.01 : 1needs 3 : 1 | Pass | |
| Focus ringBrand 400 | #6286da on #f4f4f6 | 3.21 : 1needs 3 : 1 | Pass | |
| Error textRed, adjusted to pass | Aa | #af261d on #f4f4f6 | 6.13 : 1needs 4.5 : 1 | Pass |
Dark theme
| Use | Look | Colors | Ratio | Result |
|---|---|---|---|---|
| Body text on page backgroundNeutral 50 | Aa | #f4f4f6 on #151619 | 16.47 : 1needs 4.5 : 1 | Pass |
| Body text on cardsNeutral 50 | Aa | #f4f4f6 on #22252a | 13.99 : 1needs 4.5 : 1 | Pass |
| Secondary textNeutral 400 | Aa | #9199ab on #22252a | 5.37 : 1needs 4.5 : 1 | Pass |
| Link textBrand 300 | Aa | #97aee3 on #151619 | 8.16 : 1needs 4.5 : 1 | Pass |
| Button labelBrand 400 | Aa | #151619 on #6286da | 5.11 : 1needs 4.5 : 1 | Pass |
| Input borderNeutral 500 | #6e7891 on #151619 | 4.09 : 1needs 3 : 1 | Pass | |
| Focus ringBrand 400 | #6286da on #151619 | 5.11 : 1needs 3 : 1 | Pass | |
| Error textRed, adjusted to pass | Aa | #f7776e on #151619 | 6.73 : 1needs 4.5 : 1 | Pass |
Text pairs are held to 4.5 : 1 (WCAG 1.4.3). Borders and focus rings are held to 3 : 1 against the page (WCAG 1.4.11). The ratios above are worked out with the same formula as the color contrast checker.
Which steps pass together
Brand scale
| Background step | Text steps that reach 4.5 : 1 |
|---|---|
| 50 | 500, 600, 700, 800, 900, 950 |
| 100 | 500, 600, 700, 800, 900, 950 |
| 200 | 600, 700, 800, 900, 950 |
| 300 | 700, 800, 900, 950 |
| 400 | 900, 950 |
| 500 | 50, 100 |
| 600 | 50, 100, 200 |
| 700 | 50, 100, 200, 300 |
| 800 | 50, 100, 200, 300 |
| 900 | 50, 100, 200, 300, 400 |
| 950 | 50, 100, 200, 300, 400 |
Neutral scale
| Background step | Text steps that reach 4.5 : 1 |
|---|---|
| 50 | 600, 700, 800, 900, 950 |
| 100 | 600, 700, 800, 900, 950 |
| 200 | 700, 800, 900, 950 |
| 300 | 800, 900, 950 |
| 400 | 900, 950 |
| 500 | None |
| 600 | 50, 100 |
| 700 | 50, 100, 200 |
| 800 | 50, 100, 200, 300 |
| 900 | 50, 100, 200, 300, 400 |
| 950 | 50, 100, 200, 300, 400 |
CSS variables
:root {
--brand: #2b59c3;
--on-brand: #ffffff;
--bg: #f4f4f6;
--surface: #ffffff;
--text: #454b59;
--text-muted: #586074;
--link: #2e5fd1;
--border: #6e7891;
--focus: #6286da;
--error: #af261d;
}
@media (prefers-color-scheme: dark) {
:root {
--brand: #6286da;
--on-brand: #151619;
--bg: #151619;
--surface: #22252a;
--text: #f4f4f6;
--text-muted: #9199ab;
--link: #97aee3;
--border: #6e7891;
--focus: #6286da;
--error: #f7776e;
}
}Tailwind colors
// tailwind.config: theme.extend.colors
colors: {
brand: {
50: "#f1f3f9",
100: "#e2e7f3",
200: "#c2ceeb",
300: "#97aee3",
400: "#6286da",
500: "#2e5fd1",
600: "#264da6",
700: "#203c7e",
800: "#1a2e5b",
900: "#131f39",
950: "#0d1321",
},
neutral: {
50: "#f4f4f6",
100: "#e9eaed",
200: "#d2d4db",
300: "#b4b9c5",
400: "#9199ab",
500: "#6e7891",
600: "#586074",
700: "#454b59",
800: "#343842",
900: "#22252a",
950: "#151619",
},
}What next?
Want to know how many colors on a live site fall short today? This tool looks at one thing at a time. It cannot tell you whether a whole website meets a standard or a law.
How it works
- Your color gives the hue and saturation. From them the tool builds an 11-step brand scale and a matching low-saturation neutral scale, from very light to very dark.
- For each use (body text, secondary text, links, borders, focus ring, errors) it picks a step that reaches the needed ratio against the page and card colors, using the same formula as the contrast checker.
- Your own color is kept for buttons when text on it reaches 4.5:1. If not, the closest color that works is used and you are told.
- Every pair in the tables shows its real ratio and a Pass or Fail label, so you can see the numbers and not just take our word for it.
- Copy the result as CSS variables with a dark-mode block, or as a Tailwind color scale.
Questions
What does "passes AA" mean for these colors?
Each text pair reaches a contrast ratio of at least 4.5:1, and each border or focus ring reaches at least 3:1 against the page color. These are the WCAG 2.2 levels for normal text (1.4.3) and for interface parts (1.4.11).
Why did the tool change my brand color?
If neither white nor dark text can reach 4.5:1 on your color, a button made in that exact color would have unreadable labels. The tool then moves the lightness a little, keeping the hue, and tells you it did.
Is a passing palette enough for an accessible design?
No. It covers color contrast for the pairs listed. Text over photos, hover and disabled states, charts that rely on color alone and many other parts of WCAG need their own checks.
Which color formats can I enter?
Hex (#2b59c3 or #2bc), rgb() and hsl(). The color picker next to the field works too.
Can I use the CSS variables in a client project?
Yes. They are plain CSS custom properties with a light set and a dark set. Check the result on the real design, especially where text sits on images or on a color not in the list.
More free tools
- EAA scope checkAnswer a few questions to see whether the European Accessibility Act probably applies to a business, with the article behind each answer.
- Accessibility statement generatorDraft an accessibility statement for WCAG 2.2 and the EAA. Keep several clients side by side and download Markdown or HTML.
- Target size checker (WCAG 2.5.8)Enter a button's size and spacing and see if it meets the 24 by 24 pixel rule, or which exception applies.
- Color contrast checkerCheck one color pair or paste many. Get AA and AAA results and the closest color that passes.
- Alt text, heading and link checkerPaste HTML to find missing alt text, skipped heading levels and vague link text, with line numbers.