Drawer is a shadcn/ui theme built around a vivid deep purple primary color (#4a023d) with vivid deep pink accents (#4a0219). The light mode uses a neutral background (#fcf7fc). Dark mode keeps the vivid deep purple primary (#4a023d) on a neutral background (#040103).
| Token | Light | Dark |
|---|---|---|
| Background | #fcf7fcsnow | #040103black |
| Foreground | #000000black | #fdfbfdsnow |
| Card | #fcf7fcsnow | #040103black |
| Card foreground | #000000black | #fdfbfdsnow |
| Popover | #fcf7fcsnow | #040103black |
| Popover foreground | #000000black | #fdfbfdsnow |
| Primary | #4a023dindigo | #4a023dindigo |
| Primary foreground | #fb83e5violet | #fb83e5violet |
| Secondary | #33024amidnightblue | #33024amidnightblue |
| Secondary foreground | #d583fbviolet | #d583fbviolet |
| Muted | #eeeaf1lavender | #130e15black |
| Muted foreground | #656066dimgray | #9d999fdarkgray |
| Accent | #4a0219maroon | #4a0219maroon |
| Accent foreground | #fb83a9hotpink | #fb83a9hotpink |
| Destructive | #c53916firebrick | #eb6847tomato |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4a023dindigo | #4a023dindigo |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.90:1 | AAA |
| Text on card | 19.90:1 | AAA |
| Primary button | 6.91:1 | AA |
| Secondary button | 6.76:1 | AA |
| Muted text | 5.16:1 | AA |
| Accent | 6.77:1 | AA |
| Destructive | 5.27:1 | AA |
| Text on background | 20.16:1 | AAA |
| Text on card | 20.16:1 | AAA |
| Primary button | 6.91:1 | AA |
| Secondary button | 6.76:1 | AA |
| Muted text | 6.78:1 | AA |
| Accent | 6.77:1 | AA |
| Destructive | 6.59:1 | AA |
Paste this into your globals.css to use Drawer in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.008 331.518);
--foreground: oklch(0 0 0);
--muted: oklch(0.942 0.01 315.381);
--muted-foreground: oklch(0.496 0.011 315.337);
--popover: oklch(0.982 0.008 331.518);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.982 0.008 331.518);
--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.281 0.12 337.723);
--primary-foreground: oklch(0.776 0.185 334.523);
--secondary: oklch(0.249 0.121 311.097);
--secondary-foreground: oklch(0.742 0.184 314.217);
--accent: oklch(0.264 0.102 10.373);
--accent-foreground: oklch(0.755 0.15 1.202);
--destructive: oklch(0.551 0.183 34.37);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.281 0.12 337.723);
--chart-1: oklch(0.281 0.12 337.723);
--chart-2: oklch(0.249 0.121 311.097);
--chart-3: oklch(0.264 0.102 10.373);
--chart-4: oklch(0.281 0.137 310.627);
--chart-5: oklch(0.282 0.122 337.862);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.085 0.019 332.399);
--foreground: oklch(0.991 0.003 331.451);
--muted: oklch(0.175 0.016 315.052);
--muted-foreground: oklch(0.687 0.01 315.367);
--popover: oklch(0.085 0.019 332.399);
--popover-foreground: oklch(0.991 0.003 331.451);
--card: oklch(0.085 0.019 332.399);
--card-foreground: oklch(0.991 0.003 331.451);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.281 0.12 337.723);
--primary-foreground: oklch(0.776 0.185 334.523);
--secondary: oklch(0.249 0.121 311.097);
--secondary-foreground: oklch(0.742 0.184 314.217);
--accent: oklch(0.264 0.102 10.373);
--accent-foreground: oklch(0.755 0.15 1.202);
--destructive: oklch(0.672 0.169 35.211);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.281 0.12 337.723);
--chart-1: oklch(0.281 0.12 337.723);
--chart-2: oklch(0.249 0.121 311.097);
--chart-3: oklch(0.264 0.102 10.373);
--chart-4: oklch(0.281 0.137 310.627);
--chart-5: oklch(0.282 0.122 337.862);
}