Palette Library
Campus
A retro palette for education with a pink primary and an orange accent. Text reaches 18.21:1 in light mode and 15.93:1 in dark mode.
How to use it
Campus's roles on a real interface, with the ratios stored for this palette.
- Light mode: page #fffbfc, cards #efebeb, and text #1b0f11 at 18.21:1; buttons #8b1e3f with #fffbfc labels at 8.68:1; highlights #d4a373 with #1b0f11 text at 8.26:1.
- Dark mode: page #211718, cards #291e20, and text #f5f4f4 at 15.93:1; buttons #fa849c with #211718 labels at 7.36:1; highlights #d4a373 with #211718 text at 7.73:1.
- Links: #8b1e3f reaches 8.68:1 on the light page, and #fa849c reaches 7.36:1 on the dark page.
- The accent as text: In light mode, keep #d4a373 for fills and badges, not text: it reaches only 2.20: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 | #fffbfc | #211718 |
| Surface | #efebeb | #291e20 |
| Text | #1b0f11 | #f5f4f4 |
| Primary | #8b1e3f | #fa849c |
| Primary Foreground | #fffbfc | #211718 |
| Accent | #d4a373 | #d4a373 |
| Accent Foreground | #1b0f11 | #211718 |
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 | 18.21:1AAArequired | 15.80:1AAArequired | 2.09:1Fail | 8.26:1AAA |
| Primary | 8.68:1AAArequired | 7.53:1AAA | 1.00:1Fail | 3.94:1AA large |
| Accent | 2.20:1Fail | 1.91:1Fail | 3.94:1AA large | 1.00:1Fail |
| Primary Foreground | 1.00:1Fail | 1.15:1Fail | 8.68:1AAArequired | 2.20:1Fail |
| Accent Foreground | 18.21:1AAA | 15.80:1AAA | 2.09:1Fail | 8.26:1AAArequired |
Dark mode
Scroll the table sideways on a small screen.
| Foreground / Background | Background | Surface | Primary | Accent |
|---|---|---|---|---|
| Text | 15.93:1AAArequired | 14.70:1AAArequired | 2.16:1Fail | 2.06:1Fail |
| Primary | 7.36:1AAArequired | 6.79:1AA | 1.00:1Fail | 1.04:1Fail |
| Accent | 7.73:1AAA | 7.13:1AAA | 1.04:1Fail | 1.00:1Fail |
| Primary Foreground | 1.00:1Fail | 1.08:1Fail | 7.36:1AAArequired | 7.73:1AAA |
| Accent Foreground | 1.00:1Fail | 1.08:1Fail | 7.36:1AAA | 7.73: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: #fffbfc;
--surface: #efebeb;
--text: #1b0f11;
--primary: #8b1e3f;
--primary-foreground: #fffbfc;
--accent: #d4a373;
--accent-foreground: #1b0f11;
}
.dark {
--background: #211718;
--surface: #291e20;
--text: #f5f4f4;
--primary: #fa849c;
--primary-foreground: #211718;
--accent: #d4a373;
--accent-foreground: #211718;
}
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: #fffbfc;
--surface: #efebeb;
--text: #1b0f11;
--primary: #8b1e3f;
--primary-foreground: #fffbfc;
--accent: #d4a373;
--accent-foreground: #1b0f11;
}
.dark {
color-scheme: dark;
--background: #211718;
--surface: #291e20;
--text: #f5f4f4;
--primary: #fa849c;
--primary-foreground: #211718;
--accent: #d4a373;
--accent-foreground: #211718;
}
@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 Chalkboard, which shares the retro style: text reaches 18.21:1 in light mode against 12.43:1, the primary is pink where Chalkboard's is blue, and the accent is orange where Chalkboard's is yellow.
- Compared with Storybook, which shares the Education topic: text reaches 18.21:1 in light mode against 17.83:1, the primary is pink where Storybook's is blue, and both use a orange accent.