Drawbridge for shadcn/ui

Drawbridge is a shadcn/ui theme built around a muted deep purple primary color (#462f46) with muted light purple accents (#e6e0e6). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep purple primary (#462f46) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040104black
#fbf9fbsnow
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#fdfcfdwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#462f46darkslategray
#462f46darkslategray
Primary foreground
#dccbdcthistle
#dccbdcthistle
Secondary
#e6e0e6gainsboro
#1a191ablack
Secondary foreground
#534153darkslategray
#b3b2b3darkgray
Muted
#ece9eclavender
#161316black
Muted foreground
#423e42darkslategray
#c1bdc1silver
Accent
#e6e0e6gainsboro
#1a191ablack
Accent foreground
#534153darkslategray
#b3b2b3darkgray
Destructive
#c73f05firebrick
#fa7238tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#462f46darkslategray
#462f46darkslategray

Contrast

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

Light mode
Text on background20.76:1AAA
Text on card20.54:1AAA
Primary button7.75:1AAA
Secondary button7.17:1AAA
Muted text8.71:1AAA
Accent7.17:1AAA
Destructive5.06:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.20:1AAA
Primary button7.75:1AAA
Secondary button8.28:1AAA
Muted text9.95:1AAA
Accent8.28:1AAA
Destructive7.53:1AAA

CSS variables

Paste this into your globals.css to use Drawbridge in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.086 0.019 327.515);
  --muted: oklch(0.937 0.006 326.107);
  --muted-foreground: oklch(0.368 0.008 326.231);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.342 0.05 327.165);
  --primary-foreground: oklch(0.861 0.03 326.33);
  --secondary: oklch(0.913 0.011 326.155);
  --secondary-foreground: oklch(0.401 0.037 326.767);
  --accent: oklch(0.913 0.011 326.155);
  --accent-foreground: oklch(0.401 0.037 326.767);
  --destructive: oklch(0.559 0.181 37.988);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.342 0.05 327.165);
  --chart-1: oklch(0.342 0.05 327.165);
  --chart-2: oklch(0.913 0.011 326.155);
  --chart-3: oklch(0.913 0.011 326.155);
  --chart-4: oklch(0.937 0.008 326.125);
  --chart-5: oklch(0.341 0.058 327.315);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.003 326.075);
  --muted: oklch(0.191 0.009 326.436);
  --muted-foreground: oklch(0.804 0.007 326.121);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.992 0.001 326.064);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 326.064);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.342 0.05 327.165);
  --primary-foreground: oklch(0.861 0.03 326.33);
  --secondary: oklch(0.215 0.001 326.1);
  --secondary-foreground: oklch(0.764 0.003 326.082);
  --accent: oklch(0.215 0.001 326.1);
  --accent-foreground: oklch(0.764 0.003 326.082);
  --destructive: oklch(0.707 0.181 41.849);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.342 0.05 327.165);
  --chart-1: oklch(0.342 0.05 327.165);
  --chart-2: oklch(0.215 0.001 326.1);
  --chart-3: oklch(0.215 0.001 326.1);
  --chart-4: oklch(0.248 0.002 326.105);
  --chart-5: oklch(0.341 0.058 327.315);
}