Black-and-white is a shadcn/ui theme built around a vivid light purple primary color (#f2b2f5) with vivid light pink accents (#f5b2d7). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the vivid light purple primary (#f2b2f5) on a purple-tinted background (#0a050a).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfdsnow | #0a050ablack |
| Foreground | #0f0510black | #ffffffwhite |
| Card | #fdfbfdsnow | #0a050ablack |
| Card foreground | #0f0510black | #ffffffwhite |
| Popover | #fdfbfdsnow | #0a050ablack |
| Popover foreground | #0f0510black | #ffffffwhite |
| Primary | #f2b2f5plum | #f2b2f5plum |
| Primary foreground | #630d68indigo | #630d68indigo |
| Secondary | #d0b2f5plum | #d0b2f5plum |
| Secondary foreground | #360d68midnightblue | #360d68midnightblue |
| Muted | #eae4f1lavender | #140e1bblack |
| Muted foreground | #424044darkslategray | #bdbbbfsilver |
| Accent | #f5b2d7pink | #f5b2d7pink |
| Accent foreground | #680d3fmaroon | #680d3fmaroon |
| Destructive | #c63215firebrick | #ec6246tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #f2b2f5plum | #f2b2f5plum |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.50:1 | AAA |
| Text on card | 19.50:1 | AAA |
| Primary button | 6.97:1 | AA |
| Secondary button | 8.06:1 | AAA |
| Muted text | 8.23:1 | AAA |
| Accent | 7.13:1 | AAA |
| Destructive | 5.40:1 | AA |
| Text on background | 20.20:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 6.97:1 | AA |
| Secondary button | 8.06:1 | AAA |
| Muted text | 9.95:1 | AAA |
| Accent | 7.13:1 | AAA |
| Destructive | 6.38:1 | AA |
Paste this into your globals.css to use Black-and-white in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 324.149);
--foreground: oklch(0.138 0.031 325.46);
--muted: oklch(0.927 0.019 306.173);
--muted-foreground: oklch(0.376 0.007 306.188);
--popover: oklch(0.991 0.003 324.149);
--popover-foreground: oklch(0.138 0.031 325.46);
--card: oklch(0.991 0.003 324.149);
--card-foreground: oklch(0.138 0.031 325.46);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.844 0.113 324.859);
--primary-foreground: oklch(0.362 0.155 325.846);
--secondary: oklch(0.813 0.097 304.88);
--secondary-foreground: oklch(0.293 0.141 296.659);
--accent: oklch(0.837 0.09 345.097);
--accent-foreground: oklch(0.347 0.13 353.295);
--destructive: oklch(0.546 0.189 32.851);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.844 0.113 324.859);
--chart-1: oklch(0.844 0.113 324.859);
--chart-2: oklch(0.813 0.097 304.88);
--chart-3: oklch(0.837 0.09 345.097);
--chart-4: oklch(0.846 0.08 305.22);
--chart-5: oklch(0.844 0.118 324.885);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.017 325.136);
--foreground: oklch(1 0 180);
--muted: oklch(0.178 0.028 304.383);
--muted-foreground: oklch(0.794 0.006 306.334);
--popover: oklch(0.127 0.017 325.136);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.127 0.017 325.136);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.844 0.113 324.859);
--primary-foreground: oklch(0.362 0.155 325.846);
--secondary: oklch(0.813 0.097 304.88);
--secondary-foreground: oklch(0.293 0.141 296.659);
--accent: oklch(0.837 0.09 345.097);
--accent-foreground: oklch(0.347 0.13 353.295);
--destructive: oklch(0.665 0.176 33.092);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.844 0.113 324.859);
--chart-1: oklch(0.844 0.113 324.859);
--chart-2: oklch(0.813 0.097 304.88);
--chart-3: oklch(0.837 0.09 345.097);
--chart-4: oklch(0.846 0.08 305.22);
--chart-5: oklch(0.844 0.118 324.885);
}