Sturdy is a shadcn/ui theme built around a deep green primary color (#183d0f) with deep purple accents (#350f3d). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the deep green primary (#183d0f) on a green-tinted background (#070f05).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfcwhite | #070f05black |
| Foreground | #030802black | #fcfdfcwhite |
| Card | #f9fcf8mintcream | #091307black |
| Card foreground | #020401black | #ffffffwhite |
| Popover | #f9fcf8mintcream | #091307black |
| Popover foreground | #020401black | #ffffffwhite |
| Primary | #183d0fdarkgreen | #183d0fdarkgreen |
| Primary foreground | #61d147limegreen | #61d147limegreen |
| Secondary | #350f3dmidnightblue | #350f3dmidnightblue |
| Secondary foreground | #d799e6plum | #d799e6plum |
| Muted | #ded7dfgainsboro | #262028darkslategray |
| Muted foreground | #57495adimgray | #b3a5b6darkgray |
| Accent | #350f3dmidnightblue | #350f3dmidnightblue |
| Accent foreground | #d799e6plum | #d799e6plum |
| Destructive | #a03703saddlebrown | #e65005orangered |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #183d0fdarkgreen | #183d0fdarkgreen |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.84:1 | AAA |
| Text on card | 19.85:1 | AAA |
| Primary button | 6.24:1 | AA |
| Secondary button | 7.44:1 | AAA |
| Muted text | 5.95:1 | AA |
| Accent | 7.44:1 | AAA |
| Destructive | 6.88:1 | AA |
| Text on background | 19.05:1 | AAA |
| Text on card | 18.96:1 | AAA |
| Primary button | 6.24:1 | AA |
| Secondary button | 7.44:1 | AAA |
| Muted text | 6.81:1 | AA |
| Accent | 7.44:1 | AAA |
| Destructive | 3.81:1 | AA Large |
Paste this into your globals.css to use Sturdy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.003 139.989);
--foreground: oklch(0.123 0.021 138.354);
--muted: oklch(0.888 0.013 320.004);
--muted-foreground: oklch(0.427 0.032 320.055);
--popover: oklch(0.987 0.005 139.986);
--popover-foreground: oklch(0.098 0.017 138.354);
--card: oklch(0.987 0.005 139.986);
--card-foreground: oklch(0.098 0.017 138.354);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.322 0.085 140.209);
--primary-foreground: oklch(0.767 0.204 140.226);
--secondary: oklch(0.255 0.091 319.789);
--secondary-foreground: oklch(0.769 0.126 320.098);
--accent: oklch(0.255 0.091 319.789);
--accent-foreground: oklch(0.769 0.126 320.098);
--destructive: oklch(0.484 0.148 40.504);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.322 0.085 140.209);
--chart-1: oklch(0.322 0.085 140.209);
--chart-2: oklch(0.255 0.091 319.789);
--chart-3: oklch(0.255 0.091 319.789);
--chart-4: oklch(0.285 0.105 319.73);
--chart-5: oklch(0.325 0.088 140.261);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.157 0.026 138.856);
--foreground: oklch(0.993 0.002 139.989);
--muted: oklch(0.253 0.017 320.051);
--muted-foreground: oklch(0.739 0.028 320.025);
--popover: oklch(0.172 0.03 139.307);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.172 0.03 139.307);
--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.322 0.085 140.209);
--primary-foreground: oklch(0.767 0.204 140.226);
--secondary: oklch(0.255 0.091 319.789);
--secondary-foreground: oklch(0.769 0.126 320.098);
--accent: oklch(0.255 0.091 319.789);
--accent-foreground: oklch(0.769 0.126 320.098);
--destructive: oklch(0.63 0.198 39.593);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.322 0.085 140.209);
--chart-1: oklch(0.322 0.085 140.209);
--chart-2: oklch(0.255 0.091 319.789);
--chart-3: oklch(0.255 0.091 319.789);
--chart-4: oklch(0.285 0.105 319.73);
--chart-5: oklch(0.325 0.088 140.261);
}