Which is a shadcn/ui theme built around a deep green primary color (#263e19) with deep green accents (#193e1e). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep green primary (#263e19) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #040802black | #f7f8f6whitesmoke |
| Card | #ffffffwhite | #000000black |
| Card foreground | #040802black | #f7f8f6whitesmoke |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #040802black | #f7f8f6whitesmoke |
| Primary | #263e19darkslategray | #263e19darkslategray |
| Primary foreground | #beddacsilver | #beddacsilver |
| Secondary | #393e19darkolivegreen | #393e19darkolivegreen |
| Secondary foreground | #d6ddacpalegoldenrod | #d6ddacpalegoldenrod |
| Muted | #f0f2e3beige | #1a1c0dblack |
| Muted foreground | #575856dimgray | #a9a9a7darkgray |
| Accent | #193e1edarkgreen | #193e1edarkgreen |
| Accent foreground | #acddb2silver | #acddb2silver |
| Destructive | #b42508firebrick | #f4320borangered |
| Destructive foreground | #fef3f0seashell | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #263e19darkslategray | #263e19darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.17:1 | AAA |
| Text on card | 20.17:1 | AAA |
| Primary button | 7.94:1 | AAA |
| Secondary button | 7.93:1 | AAA |
| Muted text | 6.30:1 | AA |
| Accent | 7.89:1 | AAA |
| Destructive | 6.00:1 | AA |
| Text on background | 19.71:1 | AAA |
| Text on card | 19.71:1 | AAA |
| Primary button | 7.94:1 | AAA |
| Secondary button | 7.93:1 | AAA |
| Muted text | 7.35:1 | AAA |
| Accent | 7.89:1 | AAA |
| Destructive | 3.96:1 | AA Large |
Paste this into your globals.css to use Which in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.126 0.022 131.961);
--muted: oklch(0.956 0.02 112.925);
--muted-foreground: oklch(0.458 0.003 112.657);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.126 0.022 131.961);
--card: oklch(1 0 180);
--card-foreground: oklch(0.126 0.022 131.961);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.333 0.066 135.263);
--primary-foreground: oklch(0.862 0.074 134.181);
--secondary: oklch(0.348 0.056 115.679);
--secondary-foreground: oklch(0.88 0.065 113.925);
--accent: oklch(0.326 0.069 146.532);
--accent-foreground: oklch(0.852 0.078 148.477);
--destructive: oklch(0.501 0.182 32.396);
--destructive-foreground: oklch(0.972 0.013 31.071);
--ring: oklch(0.333 0.066 135.263);
--chart-1: oklch(0.333 0.066 135.263);
--chart-2: oklch(0.348 0.056 115.679);
--chart-3: oklch(0.326 0.069 146.532);
--chart-4: oklch(0.387 0.064 115.768);
--chart-5: oklch(0.336 0.07 135.398);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.979 0.003 133.626);
--muted: oklch(0.219 0.027 114.843);
--muted-foreground: oklch(0.735 0.002 112.607);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.979 0.003 133.626);
--card: oklch(0 0 0);
--card-foreground: oklch(0.979 0.003 133.626);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.333 0.066 135.263);
--primary-foreground: oklch(0.862 0.074 134.181);
--secondary: oklch(0.348 0.056 115.679);
--secondary-foreground: oklch(0.88 0.065 113.925);
--accent: oklch(0.326 0.069 146.532);
--accent-foreground: oklch(0.852 0.078 148.477);
--destructive: oklch(0.626 0.231 32.178);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.333 0.066 135.263);
--chart-1: oklch(0.333 0.066 135.263);
--chart-2: oklch(0.348 0.056 115.679);
--chart-3: oklch(0.326 0.069 146.532);
--chart-4: oklch(0.387 0.064 115.768);
--chart-5: oklch(0.336 0.07 135.398);
}