Shades of Purple is a shadcn/ui theme built around a vivid yellow primary color (#fad000) with indigo accents (#484488). The light mode uses an indigo-tinted background (#2d2b55). Dark mode keeps the vivid yellow primary (#fad000) on an indigo-tinted background (#2d2b55).
| Token | Light | Dark |
|---|---|---|
| Background | #2d2b55darkslategray | #2d2b55darkslategray |
| Foreground | #ffffffwhite | #ffffffwhite |
| Card | #29274emidnightblue | #29274emidnightblue |
| Card foreground | #ffffffwhite | #ffffffwhite |
| Popover | #27264bmidnightblue | #27264bmidnightblue |
| Popover foreground | #ffffffwhite | #ffffffwhite |
| Primary | #fad000gold | #fad000gold |
| Primary foreground | #2e2600black | #2e2600black |
| Secondary | #534d2ddarkolivegreen | #534d2ddarkolivegreen |
| Secondary foreground | #e4e0cdgainsboro | #e4e0cdgainsboro |
| Muted | #424153darkslategray | #424153darkslategray |
| Muted foreground | #c4c3d0silver | #c4c3d0silver |
| Accent | #484488darkslateblue | #484488darkslateblue |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #da1f16crimson | #da1f16crimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #3d3b5edarkslategray | #3d3b5edarkslategray |
| Input | #434168darkslategray | #434168darkslategray |
| Ring | #fad000gold | #fad000gold |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 13.26:1 | AAA |
| Text on card | 14.00:1 | AAA |
| Primary button | 10.12:1 | AAA |
| Secondary button | 6.46:1 | AA |
| Muted text | 5.70:1 | AA |
| Accent | 8.52:1 | AAA |
| Destructive | 5.00:1 | AA |
| Text on background | 13.26:1 | AAA |
| Text on card | 14.00:1 | AAA |
| Primary button | 10.12:1 | AAA |
| Secondary button | 6.46:1 | AA |
| Muted text | 5.70:1 | AA |
| Accent | 8.52:1 | AAA |
| Destructive | 5.00:1 | AA |
Paste this into your globals.css to use Shades of Purple in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.313 0.074 283.536);
--foreground: oklch(1 0 180);
--muted: oklch(0.384 0.03 287.185);
--muted-foreground: oklch(0.822 0.018 288.301);
--popover: oklch(0.289 0.066 283.705);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.297 0.069 283.645);
--card-foreground: oklch(1 0 180);
--border: oklch(0.37 0.06 285.363);
--input: oklch(0.394 0.065 285.302);
--primary: oklch(0.869 0.178 94.261);
--primary-foreground: oklch(0.27 0.056 97.716);
--secondary: oklch(0.416 0.049 98.29);
--secondary-foreground: oklch(0.906 0.026 97.622);
--accent: oklch(0.426 0.109 283.012);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.569 0.218 29.281);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.869 0.178 94.261);
--chart-1: oklch(0.869 0.178 94.261);
--chart-2: oklch(0.416 0.049 98.29);
--chart-3: oklch(0.426 0.109 283.012);
--chart-4: oklch(0.45 0.054 98.292);
--chart-5: oklch(0.877 0.18 94.014);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.313 0.074 283.536);
--foreground: oklch(1 0 180);
--muted: oklch(0.384 0.03 287.185);
--muted-foreground: oklch(0.822 0.018 288.301);
--popover: oklch(0.289 0.066 283.705);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.297 0.069 283.645);
--card-foreground: oklch(1 0 180);
--border: oklch(0.37 0.06 285.363);
--input: oklch(0.394 0.065 285.302);
--primary: oklch(0.869 0.178 94.261);
--primary-foreground: oklch(0.27 0.056 97.716);
--secondary: oklch(0.416 0.049 98.29);
--secondary-foreground: oklch(0.906 0.026 97.622);
--accent: oklch(0.426 0.109 283.012);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.569 0.218 29.281);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.869 0.178 94.261);
--chart-1: oklch(0.869 0.178 94.261);
--chart-2: oklch(0.416 0.049 98.29);
--chart-3: oklch(0.426 0.109 283.012);
--chart-4: oklch(0.45 0.054 98.292);
--chart-5: oklch(0.877 0.18 94.014);
}