Spandex is a shadcn/ui theme built around a deep purple primary color (#5d1f60) with deep teal accents (#1f605d). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the deep purple primary (#5d1f60) on a purple-tinted background (#0a050a).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf8fcsnow | #0a050ablack |
| Foreground | #040104black | #ffffffwhite |
| Card | #faf4fbghostwhite | #0e070eblack |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fcf8fcsnow | #0a050ablack |
| Popover foreground | #040104black | #ffffffwhite |
| Primary | #5d1f60indigo | #5d1f60indigo |
| Primary foreground | #eac5ecthistle | #eac5ecthistle |
| Secondary | #605d1fdarkolivegreen | #605d1fdarkolivegreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #f3f3ecwhitesmoke | #13120cblack |
| Muted foreground | #434342darkslategray | #bdbdbcsilver |
| Accent | #1f605ddarkslategray | #1f605ddarkslategray |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #c9520dchocolate | #eb600fchocolate |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5d1f60indigo | #5d1f60indigo |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.71:1 | AAA |
| Text on card | 19.41:1 | AAA |
| Primary button | 7.46:1 | AAA |
| Secondary button | 6.80:1 | AA |
| Muted text | 8.88:1 | AAA |
| Accent | 7.24:1 | AAA |
| Destructive | 4.46:1 | AA Large |
| Text on background | 20.21:1 | AAA |
| Text on card | 19.95:1 | AAA |
| Primary button | 7.46:1 | AAA |
| Secondary button | 6.80:1 | AA |
| Muted text | 9.95:1 | AAA |
| Accent | 7.24:1 | AAA |
| Destructive | 6.19:1 | AA |
Paste this into your globals.css to use Spandex in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.007 324.172);
--foreground: oklch(0.084 0.027 326.333);
--muted: oklch(0.962 0.009 104.129);
--muted-foreground: oklch(0.382 0.002 104.066);
--popover: oklch(0.983 0.007 324.172);
--popover-foreground: oklch(0.084 0.027 326.333);
--card: oklch(0.974 0.011 324.193);
--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.363 0.125 325.716);
--primary-foreground: oklch(0.868 0.066 324.559);
--secondary: oklch(0.468 0.082 106.291);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.448 0.065 190.405);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.587 0.167 43.586);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.363 0.125 325.716);
--chart-1: oklch(0.363 0.125 325.716);
--chart-2: oklch(0.468 0.082 106.291);
--chart-3: oklch(0.448 0.065 190.405);
--chart-4: oklch(0.507 0.09 106.299);
--chart-5: oklch(0.364 0.13 325.754);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.018 325.187);
--foreground: oklch(1 0 180);
--muted: oklch(0.182 0.013 105.112);
--muted-foreground: oklch(0.799 0.002 104.009);
--popover: oklch(0.127 0.018 325.187);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.14 0.021 325.02);
--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.363 0.125 325.716);
--primary-foreground: oklch(0.868 0.066 324.559);
--secondary: oklch(0.468 0.082 106.291);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.448 0.065 190.405);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.657 0.189 43.3);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.363 0.125 325.716);
--chart-1: oklch(0.363 0.125 325.716);
--chart-2: oklch(0.468 0.082 106.291);
--chart-3: oklch(0.448 0.065 190.405);
--chart-4: oklch(0.507 0.09 106.299);
--chart-5: oklch(0.364 0.13 325.754);
}