Palette Library
Cosmos
A vibrant palette for SaaS with a purple primary and a teal accent. Text reaches 16.13:1 in light mode and 17.22:1 in dark mode.
How to use it
Cosmos's roles on a real interface, with the ratios stored for this palette.
- Light mode: page #fbf6ee, cards #eaeaea, and text #21190d at 16.13:1; buttons #5f3dc4 with #fbf6ee labels at 6.61:1; highlights #63e6be with #21190d text at 11.23:1.
- Dark mode: page #0a0906, cards #1b1711, and text #f1eeeb at 17.22:1; buttons #a495ff with #0a0906 labels at 7.89:1; highlights #63e6be with #0a0906 text at 12.88:1.
- Links: #5f3dc4 reaches 6.61:1 on the light page, and #a495ff reaches 7.89:1 on the dark page.
- The accent as text: In light mode, keep #63e6be for fills and badges, not text: it reaches only 1.43:1 on the page.
Preview
The same palette on a small interface in light and dark.
Light mode
A place for your ideas
Start with colors that work together.
Your next project
A surface for the details that matter.
NewExplore your palette →
Dark mode
A place for your ideas
Start with colors that work together.
Your next project
A surface for the details that matter.
NewExplore your palette →
Roles
Five roles and their two foregrounds. Copy the exact HEX values.
| Role | Light | Dark |
|---|---|---|
| Background | #fbf6ee | #0a0906 |
| Surface | #eaeaea | #1b1711 |
| Text | #21190d | #f1eeeb |
| Primary | #5f3dc4 | #a495ff |
| Primary Foreground | #fbf6ee | #0a0906 |
| Accent | #63e6be | #63e6be |
| Accent Foreground | #21190d | #0a0906 |
Contrast matrix
Five required pairs per mode, judged on the final 8-bit colors.
Light mode
Scroll the table sideways on a small screen.
| Foreground / Background | Background | Surface | Primary | Accent |
|---|---|---|---|---|
| Text | 16.13:1AAArequired | 14.43:1AAArequired | 2.43:1Fail | 11.23:1AAA |
| Primary | 6.61:1AArequired | 5.91:1AA | 1.00:1Fail | 4.60:1AA |
| Accent | 1.43:1Fail | 1.28:1Fail | 4.60:1AA | 1.00:1Fail |
| Primary Foreground | 1.00:1Fail | 1.11:1Fail | 6.61:1AArequired | 1.43:1Fail |
| Accent Foreground | 16.13:1AAA | 14.43:1AAA | 2.43:1Fail | 11.23:1AAArequired |
Dark mode
Scroll the table sideways on a small screen.
| Foreground / Background | Background | Surface | Primary | Accent |
|---|---|---|---|---|
| Text | 17.22:1AAArequired | 15.43:1AAArequired | 2.18:1Fail | 1.33:1Fail |
| Primary | 7.89:1AAArequired | 7.06:1AAA | 1.00:1Fail | 1.63:1Fail |
| Accent | 12.88:1AAA | 11.54:1AAA | 1.63:1Fail | 1.00:1Fail |
| Primary Foreground | 1.00:1Fail | 1.11:1Fail | 7.89:1AAArequired | 12.88:1AAA |
| Accent Foreground | 1.00:1Fail | 1.11:1Fail | 7.89:1AAA | 12.88:1AAArequired |
AAA: normal text ≥ 7:1. AA: normal text ≥ 4.5:1. AA large: large text ≥ 3:1 (24 px, or 18.66 px bold). UI: required component contrast ≥ 3:1. Fail: below 3:1. Required marks the five pairs ColorLint checks in each mode. Other pairs are informational.
ColorLint checks color contrast only. Passing pairs do not mean a page is accessible.
Exports
Both modes, with the exact values the Palette Generator exports.
CSS variables
/* ColorLint palette (v1). Light values in :root; dark values in .dark. */
:root {
--background: #fbf6ee;
--surface: #eaeaea;
--text: #21190d;
--primary: #5f3dc4;
--primary-foreground: #fbf6ee;
--accent: #63e6be;
--accent-foreground: #21190d;
}
.dark {
--background: #0a0906;
--surface: #1b1711;
--text: #f1eeeb;
--primary: #a495ff;
--primary-foreground: #0a0906;
--accent: #63e6be;
--accent-foreground: #0a0906;
}
Tailwind v4
/* ColorLint palette for Tailwind CSS v4 (palette v1). */
/* Paste after @import "tailwindcss". Add the "dark" class to <html> for dark mode. */
@custom-variant dark (&:where(.dark, .dark *));
:root {
color-scheme: light;
--background: #fbf6ee;
--surface: #eaeaea;
--text: #21190d;
--primary: #5f3dc4;
--primary-foreground: #fbf6ee;
--accent: #63e6be;
--accent-foreground: #21190d;
}
.dark {
color-scheme: dark;
--background: #0a0906;
--surface: #1b1711;
--text: #f1eeeb;
--primary: #a495ff;
--primary-foreground: #0a0906;
--accent: #63e6be;
--accent-foreground: #0a0906;
}
@theme inline {
--color-background: var(--background);
--color-surface: var(--surface);
--color-text: var(--text);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
}
Compared with similar palettes
- Compared with Spark, which shares the vibrant style: text reaches 16.13:1 in light mode against 15.91:1, the primary is purple where Spark's is red, and the accent is teal where Spark's is purple.
- Compared with Coral Reef, which shares the vibrant style: text reaches 16.13:1 in light mode against 13.16:1, the primary is purple where Coral Reef's is red, and both use a teal accent.