Drawer for shadcn/ui

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).

Color palette

TokenLightDark
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

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.90:1AAA
Text on card19.90:1AAA
Primary button6.91:1AA
Secondary button6.76:1AA
Muted text5.16:1AA
Accent6.77:1AA
Destructive5.27:1AA
Dark mode
Text on background20.16:1AAA
Text on card20.16:1AAA
Primary button6.91:1AA
Secondary button6.76:1AA
Muted text6.78:1AA
Accent6.77:1AA
Destructive6.59:1AA

CSS variables

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);
}