Foam is a shadcn/ui theme built around a muted deep purple primary color (#251d24) with muted deep pink accents (#251d20). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the muted deep purple primary (#251d24) on a neutral background (#030203).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfdsnow | #030203black |
| Foreground | #000000black | #ffffffwhite |
| Card | #fdfbfdsnow | #030203black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fdfbfdsnow | #030203black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #251d24black | #251d24black |
| Primary foreground | #c2b2c1silver | #c2b2c1silver |
| Secondary | #221d25black | #221d25black |
| Secondary foreground | #bcb2c2silver | #bcb2c2silver |
| Muted | #e6e4e7gainsboro | #1a181bblack |
| Muted foreground | #48424cdarkslategray | #b9b3bdsilver |
| Accent | #251d20black | #251d20black |
| Accent foreground | #c2b2b8silver | #c2b2b8silver |
| Destructive | #a20401darkred | #e40501red |
| Destructive foreground | #ffd7d6mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #251d24black | #251d24black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.46:1 | AAA |
| Text on card | 20.46:1 | AAA |
| Primary button | 8.13:1 | AAA |
| Secondary button | 8.08:1 | AAA |
| Muted text | 7.70:1 | AAA |
| Accent | 8.10:1 | AAA |
| Destructive | 6.22:1 | AA |
| Text on background | 20.72:1 | AAA |
| Text on card | 20.72:1 | AAA |
| Primary button | 8.13:1 | AAA |
| Secondary button | 8.08:1 | AAA |
| Muted text | 8.59:1 | AAA |
| Accent | 8.10:1 | AAA |
| Destructive | 4.84:1 | AA |
Paste this into your globals.css to use Foam in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 328.63);
--foreground: oklch(0 0 0);
--muted: oklch(0.921 0.004 312.327);
--muted-foreground: oklch(0.39 0.018 312.01);
--popover: oklch(0.991 0.003 328.63);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.991 0.003 328.63);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.244 0.018 329.373);
--primary-foreground: oklch(0.782 0.028 328.979);
--secondary: oklch(0.24 0.016 311.85);
--secondary-foreground: oklch(0.777 0.026 312.114);
--accent: oklch(0.242 0.014 352.154);
--accent-foreground: oklch(0.779 0.021 351.37);
--destructive: oklch(0.449 0.183 29.404);
--destructive-foreground: oklch(0.913 0.045 19.149);
--ring: oklch(0.244 0.018 329.373);
--chart-1: oklch(0.244 0.018 329.373);
--chart-2: oklch(0.24 0.016 311.85);
--chart-3: oklch(0.242 0.014 352.154);
--chart-4: oklch(0.271 0.02 311.819);
--chart-5: oklch(0.243 0.022 329.563);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.088 0.011 329.355);
--foreground: oklch(1 0 180);
--muted: oklch(0.213 0.005 312.168);
--muted-foreground: oklch(0.773 0.015 312.209);
--popover: oklch(0.088 0.011 329.355);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.088 0.011 329.355);
--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.244 0.018 329.373);
--primary-foreground: oklch(0.782 0.028 328.979);
--secondary: oklch(0.24 0.016 311.85);
--secondary-foreground: oklch(0.777 0.026 312.114);
--accent: oklch(0.242 0.014 352.154);
--accent-foreground: oklch(0.779 0.021 351.37);
--destructive: oklch(0.579 0.236 29.345);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.244 0.018 329.373);
--chart-1: oklch(0.244 0.018 329.373);
--chart-2: oklch(0.24 0.016 311.85);
--chart-3: oklch(0.242 0.014 352.154);
--chart-4: oklch(0.271 0.02 311.819);
--chart-5: oklch(0.243 0.022 329.563);
}