Sturdy is a shadcn/ui theme built around a deep violet primary color (#0c0811) with deep green accents (#0e1108). The light mode uses a neutral background (#faf8fc). Dark mode keeps the deep violet primary (#0c0811) on a neutral background (#020203).
| Token | Light | Dark |
|---|---|---|
| Background | #faf8fcghostwhite | #020203black |
| Foreground | #020104black | #faf9fbghostwhite |
| Card | #faf8fcghostwhite | #020203black |
| Card foreground | #020104black | #faf9fbghostwhite |
| Popover | #faf8fcghostwhite | #020203black |
| Popover foreground | #020104black | #faf9fbghostwhite |
| Primary | #0c0811black | #0c0811black |
| Primary foreground | #9e86c6mediumpurple | #9e86c6mediumpurple |
| Secondary | #0e1108black | #0e1108black |
| Secondary foreground | #7c9c49olivedrab | #7c9c49olivedrab |
| Muted | #f0f1efwhitesmoke | #10100eblack |
| Muted foreground | #454643darkslategray | #babcb9silver |
| Accent | #0e1108black | #0e1108black |
| Accent foreground | #7c9c49olivedrab | #7c9c49olivedrab |
| Destructive | #93320bsaddlebrown | #f06c38tomato |
| Destructive foreground | #fcdfd4antiquewhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #0c0811black | #0c0811black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.72:1 | AAA |
| Text on card | 19.72:1 | AAA |
| Primary button | 6.30:1 | AA |
| Secondary button | 6.07:1 | AA |
| Muted text | 8.37:1 | AAA |
| Accent | 6.07:1 | AA |
| Destructive | 6.17:1 | AA |
| Text on background | 19.76:1 | AAA |
| Text on card | 19.76:1 | AAA |
| Primary button | 6.30:1 | AA |
| Secondary button | 6.07:1 | AA |
| Muted text | 9.94:1 | AAA |
| Accent | 6.07:1 | AA |
| Destructive | 6.90:1 | AA |
Paste this into your globals.css to use Sturdy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.005 303.569);
--foreground: oklch(0.079 0.019 304.676);
--muted: oklch(0.956 0.003 123.685);
--muted-foreground: oklch(0.393 0.005 123.819);
--popover: oklch(0.982 0.005 303.569);
--popover-foreground: oklch(0.079 0.019 304.676);
--card: oklch(0.982 0.005 303.569);
--card-foreground: oklch(0.079 0.019 304.676);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.145 0.021 301.833);
--primary-foreground: oklch(0.665 0.097 301.426);
--secondary: oklch(0.172 0.019 125.215);
--secondary-foreground: oklch(0.65 0.116 126.764);
--accent: oklch(0.172 0.019 125.215);
--accent-foreground: oklch(0.65 0.116 126.764);
--destructive: oklch(0.454 0.139 38.667);
--destructive-foreground: oklch(0.925 0.035 42.835);
--ring: oklch(0.145 0.021 301.833);
--chart-1: oklch(0.145 0.021 301.833);
--chart-2: oklch(0.172 0.019 125.215);
--chart-3: oklch(0.172 0.019 125.215);
--chart-4: oklch(0.215 0.028 125.769);
--chart-5: oklch(0.144 0.022 301.744);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.085 0.009 304.116);
--foreground: oklch(0.983 0.003 303.589);
--muted: oklch(0.173 0.005 124.031);
--muted-foreground: oklch(0.792 0.004 123.714);
--popover: oklch(0.085 0.009 304.116);
--popover-foreground: oklch(0.983 0.003 303.589);
--card: oklch(0.085 0.009 304.116);
--card-foreground: oklch(0.983 0.003 303.589);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.145 0.021 301.833);
--primary-foreground: oklch(0.665 0.097 301.426);
--secondary: oklch(0.172 0.019 125.215);
--secondary-foreground: oklch(0.65 0.116 126.764);
--accent: oklch(0.172 0.019 125.215);
--accent-foreground: oklch(0.65 0.116 126.764);
--destructive: oklch(0.684 0.176 40.703);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.145 0.021 301.833);
--chart-1: oklch(0.145 0.021 301.833);
--chart-2: oklch(0.172 0.019 125.215);
--chart-3: oklch(0.172 0.019 125.215);
--chart-4: oklch(0.215 0.028 125.769);
--chart-5: oklch(0.144 0.022 301.744);
}