grayscale is a shadcn/ui theme built around a vivid violet primary color (#c370ff) with vivid purple accents (#ff70f3). The light mode uses a neutral background (#faf7fd). Dark mode switches to a near-white primary (#ffffff) on a neutral background (#101010).
| Token | Light | Dark |
|---|---|---|
| Background | #faf7fdghostwhite | #101010black |
| Foreground | #0e0317black | #fdfcfdwhite |
| Card | #f8f3fcghostwhite | #1c1c1cblack |
| Card foreground | #0c0212black | #ffffffwhite |
| Popover | #faf7fdghostwhite | #1c1c1cblack |
| Popover foreground | #0e0317black | #fdfcfdwhite |
| Primary | #c370fforchid | #ffffffwhite |
| Primary foreground | #24003dmidnightblue | #272528darkslategray |
| Secondary | #7c70ffmediumslateblue | #b9b8basilver |
| Secondary foreground | #000000black | #191919black |
| Muted | #e2e1e5gainsboro | #3d3d3ddarkslategray |
| Muted foreground | #424243darkslategray | #bcbcbdsilver |
| Accent | #ff70f3violet | #828082gray |
| Accent foreground | #3d0038midnightblue | #000000black |
| Destructive | #b33005firebrick | #ea2a2acrimson |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #edecefwhitesmoke | #212021black |
| Input | #edecefwhitesmoke | #1e1d1fblack |
| Ring | #c370fforchid | #928a8agray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.93:1 | AAA |
| Text on card | 18.56:1 | AAA |
| Primary button | 6.21:1 | AA |
| Secondary button | 5.62:1 | AA |
| Muted text | 7.71:1 | AAA |
| Accent | 7.06:1 | AAA |
| Destructive | 6.27:1 | AA |
| Text on background | 18.59:1 | AAA |
| Text on card | 17.04:1 | AAA |
| Primary button | 15.20:1 | AAA |
| Secondary button | 8.87:1 | AAA |
| Muted text | 5.72:1 | AA |
| Accent | 5.36:1 | AA |
| Destructive | 4.32:1 | AA Large |
Paste this into your globals.css to use grayscale in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.98 0.009 311.649);
--foreground: oklch(0.136 0.048 310.573);
--muted: oklch(0.912 0.005 290.153);
--muted-foreground: oklch(0.378 0.002 290.136);
--popover: oklch(0.98 0.009 311.649);
--popover-foreground: oklch(0.136 0.048 310.573);
--card: oklch(0.97 0.014 311.609);
--card-foreground: oklch(0.124 0.043 311.934);
--border: oklch(0.944 0.004 311.689);
--input: oklch(0.944 0.004 311.689);
--primary: oklch(0.698 0.211 308.858);
--primary-foreground: oklch(0.207 0.107 305.196);
--secondary: oklch(0.631 0.205 282.562);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.762 0.228 330.871);
--accent-foreground: oklch(0.249 0.112 332.392);
--destructive: oklch(0.509 0.173 35.555);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.698 0.211 308.858);
--chart-1: oklch(0.698 0.211 308.858);
--chart-2: oklch(0.631 0.205 282.562);
--chart-3: oklch(0.762 0.228 330.871);
--chart-4: oklch(0.668 0.183 284.053);
--chart-5: oklch(0.696 0.217 308.742);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.173 0 160.017);
--foreground: oklch(0.991 0.002 311.708);
--muted: oklch(0.36 0 180);
--muted-foreground: oklch(0.796 0.002 290.203);
--popover: oklch(0.226 0 180);
--popover-foreground: oklch(0.991 0.002 311.708);
--card: oklch(0.226 0 180);
--card-foreground: oklch(1 0 180);
--border: oklch(0.245 0.002 311.667);
--input: oklch(0.234 0.003 311.61);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.268 0.005 311.579);
--secondary: oklch(0.783 0.004 311.956);
--secondary-foreground: oklch(0.213 0 311.976);
--accent: oklch(0.603 0.003 328.114);
--accent-foreground: oklch(0 0 0);
--destructive: oklch(0.605 0.225 27.288);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.64 0.009 17.392);
--chart-1: oklch(1 0 180);
--chart-2: oklch(0.783 0.004 311.956);
--chart-3: oklch(0.603 0.003 328.114);
--chart-4: oklch(0.808 0.003 311.961);
--chart-5: oklch(1 0 180);
}