Walnut is a shadcn/ui theme built around a light green primary color (#e7ecca) with light purple accents (#eccae7). The light mode uses a neutral background (#fcfdf7). Dark mode keeps the light green primary (#e7ecca) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdf7snow | #000000black |
| Foreground | #141703black | #ffffffwhite |
| Card | #fcfdf7snow | #000000black |
| Card foreground | #141703black | #ffffffwhite |
| Popover | #fcfdf7snow | #000000black |
| Popover foreground | #141703black | #ffffffwhite |
| Primary | #e7eccaantiquewhite | #e7eccaantiquewhite |
| Primary foreground | #141708black | #141708black |
| Secondary | #cae7ecgainsboro | #cae7ecgainsboro |
| Secondary foreground | #225862darkslategray | #225862darkslategray |
| Muted | #f1f3f4whitesmoke | #0b0e0eblack |
| Muted foreground | #566467dimgray | #98a6a9darkgray |
| Accent | #eccae7gainsboro | #eccae7gainsboro |
| Accent foreground | #622258indigo | #622258indigo |
| Destructive | #8a1700darkred | #fa2a00orangered |
| Destructive foreground | #ffc8bdpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #e7eccaantiquewhite | #e7eccaantiquewhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 17.82:1 | AAA |
| Text on card | 17.82:1 | AAA |
| Primary button | 14.96:1 | AAA |
| Secondary button | 6.10:1 | AA |
| Muted text | 5.52:1 | AA |
| Accent | 7.51:1 | AAA |
| Destructive | 6.48:1 | AA |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 14.96:1 | AAA |
| Secondary button | 6.10:1 | AA |
| Muted text | 7.72:1 | AAA |
| Accent | 7.51:1 | AAA |
| Destructive | 3.89:1 | AA Large |
Paste this into your globals.css to use Walnut in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.992 0.009 114.231);
--foreground: oklch(0.195 0.039 117.292);
--muted: oklch(0.963 0.002 211.042);
--muted-foreground: oklch(0.492 0.018 211.08);
--popover: oklch(0.992 0.009 114.231);
--popover-foreground: oklch(0.195 0.039 117.292);
--card: oklch(0.992 0.009 114.231);
--card-foreground: oklch(0.195 0.039 117.292);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.931 0.046 114.973);
--primary-foreground: oklch(0.196 0.027 116.685);
--secondary: oklch(0.908 0.031 211.073);
--secondary-foreground: oklch(0.428 0.058 212.891);
--accent: oklch(0.877 0.054 331.625);
--accent-foreground: oklch(0.37 0.115 334.718);
--destructive: oklch(0.409 0.152 32.684);
--destructive-foreground: oklch(0.878 0.065 31.378);
--ring: oklch(0.931 0.046 114.973);
--chart-1: oklch(0.931 0.046 114.973);
--chart-2: oklch(0.908 0.031 211.073);
--chart-3: oklch(0.877 0.054 331.625);
--chart-4: oklch(0.928 0.024 211.053);
--chart-5: oklch(0.934 0.048 115.026);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(1 0 180);
--muted: oklch(0.16 0.004 211.046);
--muted-foreground: oklch(0.716 0.017 211.047);
--popover: oklch(0 0 0);
--popover-foreground: oklch(1 0 180);
--card: oklch(0 0 0);
--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.931 0.046 114.973);
--primary-foreground: oklch(0.196 0.027 116.685);
--secondary: oklch(0.908 0.031 211.073);
--secondary-foreground: oklch(0.428 0.058 212.891);
--accent: oklch(0.877 0.054 331.625);
--accent-foreground: oklch(0.37 0.115 334.718);
--destructive: oklch(0.632 0.242 31.66);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.931 0.046 114.973);
--chart-1: oklch(0.931 0.046 114.973);
--chart-2: oklch(0.908 0.031 211.073);
--chart-3: oklch(0.877 0.054 331.625);
--chart-4: oklch(0.928 0.024 211.053);
--chart-5: oklch(0.934 0.048 115.026);
}