Sturdy is a shadcn/ui theme built around a vivid deep pink primary color (#7d0d50) with vivid deep red accents (#7d0d18). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep pink primary (#7d0d50) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #11040bblack | #fbf9fasnow |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #0c0309black | #fdfcfdwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #11040bblack | #fbf9fasnow |
| Primary | #7d0d50purple | #7d0d50purple |
| Primary foreground | #f9c3e3pink | #f9c3e3pink |
| Secondary | #710d7dpurple | #710d7dpurple |
| Secondary foreground | #f3c3f9lavender | #f3c3f9lavender |
| Muted | #efe6eflavender | #181019black |
| Muted foreground | #524054darkslategray | #bdabbfsilver |
| Accent | #7d0d18maroon | #7d0d18maroon |
| Accent foreground | #f9c3c8pink | #f9c3c8pink |
| Destructive | #770f0dmaroon | #d31b17firebrick |
| Destructive foreground | #f8c0bflightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #7d0d50purple | #7d0d50purple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.07:1 | AAA |
| Text on card | 19.89:1 | AAA |
| Primary button | 6.83:1 | AA |
| Secondary button | 6.78:1 | AA |
| Muted text | 7.74:1 | AAA |
| Accent | 7.05:1 | AAA |
| Destructive | 7.12:1 | AAA |
| Text on background | 20.03:1 | AAA |
| Text on card | 20.20:1 | AAA |
| Primary button | 6.83:1 | AA |
| Secondary button | 6.78:1 | AA |
| Muted text | 8.65:1 | AAA |
| Accent | 7.05:1 | AAA |
| Destructive | 5.33:1 | AA |
Paste this into your globals.css to use Sturdy in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.135 0.032 342.637);
--muted: oklch(0.934 0.016 322.696);
--muted-foreground: oklch(0.398 0.042 323.027);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.135 0.032 342.637);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.121 0.028 340.85);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.394 0.154 350.911);
--primary-foreground: oklch(0.874 0.074 342.051);
--secondary: oklch(0.4 0.178 323.289);
--secondary-foreground: oklch(0.876 0.089 323.015);
--accent: oklch(0.378 0.143 23.681);
--accent-foreground: oklch(0.866 0.062 11.714);
--destructive: oklch(0.367 0.138 28);
--destructive-foreground: oklch(0.857 0.065 19.624);
--ring: oklch(0.394 0.154 350.911);
--chart-1: oklch(0.394 0.154 350.911);
--chart-2: oklch(0.4 0.178 323.289);
--chart-3: oklch(0.378 0.143 23.681);
--chart-4: oklch(0.43 0.193 323.263);
--chart-5: oklch(0.397 0.157 351.328);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.984 0.002 340.289);
--muted: oklch(0.187 0.024 323.104);
--muted-foreground: oklch(0.763 0.036 322.812);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.984 0.002 340.289);
--card: oklch(0.092 0 180);
--card-foreground: oklch(0.992 0.001 340.261);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.394 0.154 350.911);
--primary-foreground: oklch(0.874 0.074 342.051);
--secondary: oklch(0.4 0.178 323.289);
--secondary-foreground: oklch(0.876 0.089 323.015);
--accent: oklch(0.378 0.143 23.681);
--accent-foreground: oklch(0.866 0.062 11.714);
--destructive: oklch(0.554 0.215 28.499);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.394 0.154 350.911);
--chart-1: oklch(0.394 0.154 350.911);
--chart-2: oklch(0.4 0.178 323.289);
--chart-3: oklch(0.378 0.143 23.681);
--chart-4: oklch(0.43 0.193 323.263);
--chart-5: oklch(0.397 0.157 351.328);
}