Variable is a shadcn/ui theme built around a deep green primary color (#303f21) with deep green accents (#213f21). The light mode uses a neutral background (#fcfefb). Dark mode keeps the deep green primary (#303f21) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfefbwhite | #000000black |
| Foreground | #000000black | #f7f8f7whitesmoke |
| Card | #fcfefbwhite | #000000black |
| Card foreground | #000000black | #f7f8f7whitesmoke |
| Popover | #fcfefbwhite | #000000black |
| Popover foreground | #000000black | #f7f8f7whitesmoke |
| Primary | #303f21darkslategray | #303f21darkslategray |
| Primary foreground | #c9dab9silver | #c9dab9silver |
| Secondary | #3f3f21darkolivegreen | #3f3f21darkolivegreen |
| Secondary foreground | #dadab9lightgrey | #dadab9lightgrey |
| Muted | #dcdcd5gainsboro | #2a2a23darkslategray |
| Muted foreground | #60605cdimgray | #a3a39fdarkgray |
| Accent | #213f21darkslategray | #213f21darkslategray |
| Accent foreground | #b9dab9silver | #b9dab9silver |
| Destructive | #a73b02saddlebrown | #fc5a03orangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #303f21darkslategray | #303f21darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.70:1 | AAA |
| Text on card | 20.70:1 | AAA |
| Primary button | 7.59:1 | AAA |
| Secondary button | 7.51:1 | AAA |
| Muted text | 4.59:1 | AA |
| Accent | 7.61:1 | AAA |
| Destructive | 6.42:1 | AA |
| Text on background | 19.72:1 | AAA |
| Text on card | 19.72:1 | AAA |
| Primary button | 7.59:1 | AAA |
| Secondary button | 7.51:1 | AAA |
| Muted text | 5.72:1 | AA |
| Accent | 7.61:1 | AAA |
| Destructive | 6.62:1 | AA |
Paste this into your globals.css to use Variable in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.995 0.004 128.505);
--foreground: oklch(0 0 0);
--muted: oklch(0.893 0.009 106.586);
--muted-foreground: oklch(0.489 0.006 106.616);
--popover: oklch(0.995 0.004 128.505);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.995 0.004 128.505);
--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.348 0.053 130.405);
--primary-foreground: oklch(0.867 0.048 129.097);
--secondary: oklch(0.361 0.047 108.532);
--secondary-foreground: oklch(0.88 0.044 107.275);
--accent: oklch(0.337 0.063 144.025);
--accent-foreground: oklch(0.855 0.057 145.052);
--destructive: oklch(0.5 0.152 41.285);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.348 0.053 130.405);
--chart-1: oklch(0.348 0.053 130.405);
--chart-2: oklch(0.361 0.047 108.532);
--chart-3: oklch(0.337 0.063 144.025);
--chart-4: oklch(0.398 0.053 108.575);
--chart-5: oklch(0.351 0.057 130.593);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.978 0.002 128.485);
--muted: oklch(0.281 0.012 107.161);
--muted-foreground: oklch(0.713 0.005 106.535);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.978 0.002 128.485);
--card: oklch(0 0 0);
--card-foreground: oklch(0.978 0.002 128.485);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.348 0.053 130.405);
--primary-foreground: oklch(0.867 0.048 129.097);
--secondary: oklch(0.361 0.047 108.532);
--secondary-foreground: oklch(0.88 0.044 107.275);
--accent: oklch(0.337 0.063 144.025);
--accent-foreground: oklch(0.855 0.057 145.052);
--destructive: oklch(0.677 0.211 40.189);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.348 0.053 130.405);
--chart-1: oklch(0.348 0.053 130.405);
--chart-2: oklch(0.361 0.047 108.532);
--chart-3: oklch(0.337 0.063 144.025);
--chart-4: oklch(0.398 0.053 108.575);
--chart-5: oklch(0.351 0.057 130.593);
}