Grim is a shadcn/ui theme built around a violet primary color (#754ed0) with purple accents (#b64ed0). The light mode uses a neutral background (#fcfcfd). Dark mode keeps the violet primary (#754ed0) on a violet-tinted background (#06040c).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfcfdwhite | #06040cblack |
| Foreground | #000000black | #ffffffwhite |
| Card | #f9f8fcghostwhite | #080510black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f9f8fcghostwhite | #080510black |
| Popover foreground | #000000black | #ffffffwhite |
| Primary | #754ed0slateblue | #754ed0slateblue |
| Primary foreground | #ffffffwhite | #ffffffwhite |
| Secondary | #4e68d0royalblue | #4e68d0royalblue |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dde0e9gainsboro | #161922black |
| Muted foreground | #4f525fdarkslategray | #a0a4b0darkgray |
| Accent | #b64ed0mediumorchid | #b64ed0mediumorchid |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #ac1b02firebrick | #fd3512orangered |
| Destructive foreground | #ffe5e1mistyrose | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #754ed0slateblue | #754ed0slateblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.43:1 | AAA |
| Text on card | 19.87:1 | AAA |
| Primary button | 5.60:1 | AA |
| Secondary button | 4.99:1 | AA |
| Muted text | 5.86:1 | AA |
| Accent | 4.21:1 | AA Large |
| Destructive | 6.03:1 | AA |
| Text on background | 20.41:1 | AAA |
| Text on card | 20.21:1 | AAA |
| Primary button | 5.60:1 | AA |
| Secondary button | 4.99:1 | AA |
| Muted text | 7.06:1 | AAA |
| Accent | 4.21:1 | AA Large |
| Destructive | 3.69:1 | AA Large |
Paste this into your globals.css to use Grim in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.002 299.997);
--foreground: oklch(0 0 0);
--muted: oklch(0.906 0.012 274.864);
--muted-foreground: oklch(0.44 0.021 274.403);
--popover: oklch(0.981 0.005 299.955);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.981 0.005 299.955);
--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.536 0.191 292.572);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.551 0.163 269.804);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.61 0.208 319.079);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.478 0.181 31.753);
--destructive-foreground: oklch(0.942 0.029 29.602);
--ring: oklch(0.536 0.191 292.572);
--chart-1: oklch(0.536 0.191 292.572);
--chart-2: oklch(0.551 0.163 269.804);
--chart-3: oklch(0.61 0.208 319.079);
--chart-4: oklch(0.581 0.151 270.559);
--chart-5: oklch(0.532 0.2 292.011);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.115 0.023 300.093);
--foreground: oklch(1 0 180);
--muted: oklch(0.214 0.018 273.835);
--muted-foreground: oklch(0.719 0.018 274.709);
--popover: oklch(0.127 0.026 298.977);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.127 0.026 298.977);
--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.536 0.191 292.572);
--primary-foreground: oklch(1 0 180);
--secondary: oklch(0.551 0.163 269.804);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.61 0.208 319.079);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.644 0.237 31.866);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.536 0.191 292.572);
--chart-1: oklch(0.536 0.191 292.572);
--chart-2: oklch(0.551 0.163 269.804);
--chart-3: oklch(0.61 0.208 319.079);
--chart-4: oklch(0.581 0.151 270.559);
--chart-5: oklch(0.532 0.2 292.011);
}