Spool for shadcn/ui

Spool is a shadcn/ui theme built around a deep violet primary color (#291f3d) with deep green accents (#323d1f). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the deep violet primary (#291f3d) on a violet-tinted background (#09050f).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#09050fblack
Foreground
#080410black
#faf9fbghostwhite
Card
#f6f4fbghostwhite
#0b0713black
Card foreground
#06030cblack
#fcfcfdwhite
Popover
#f9f8fcghostwhite
#09050fblack
Popover foreground
#080410black
#faf9fbghostwhite
Primary
#291f3ddarkslategray
#291f3ddarkslategray
Primary foreground
#c1b4d9lightsteelblue
#c1b4d9lightsteelblue
Secondary
#323d1fdarkslategray
#323d1fdarkslategray
Secondary foreground
#ccd9b4silver
#ccd9b4silver
Muted
#ecf1e4beige
#161b0eblack
Muted foreground
#525251darkslategray
#aeaeaddarkgray
Accent
#323d1fdarkslategray
#323d1fdarkslategray
Accent foreground
#ccd9b4silver
#ccd9b4silver
Destructive
#b93213firebrick
#e7421dorangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#291f3ddarkslategray
#291f3ddarkslategray

Contrast

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

Light mode
Text on background19.16:1AAA
Text on card18.78:1AAA
Primary button7.95:1AAA
Secondary button7.75:1AAA
Muted text6.80:1AA
Accent7.75:1AAA
Destructive5.97:1AA
Dark mode
Text on background19.20:1AAA
Text on card19.45:1AAA
Primary button7.95:1AAA
Secondary button7.75:1AAA
Muted text7.92:1AAA
Accent7.75:1AAA
Destructive4.03:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 302.119);
  --foreground: oklch(0.127 0.029 301.397);
  --muted: oklch(0.951 0.017 122.492);
  --muted-foreground: oklch(0.439 0.003 122.311);
  --popover: oklch(0.981 0.006 302.119);
  --popover-foreground: oklch(0.127 0.029 301.397);
  --card: oklch(0.971 0.009 302.071);
  --card-foreground: oklch(0.114 0.025 302.685);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.267 0.056 298.661);
  --primary-foreground: oklch(0.794 0.054 301.152);
  --secondary: oklch(0.342 0.051 124.798);
  --secondary-foreground: oklch(0.867 0.052 123.164);
  --accent: oklch(0.342 0.051 124.798);
  --accent-foreground: oklch(0.867 0.052 123.164);
  --destructive: oklch(0.521 0.176 33.59);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.267 0.056 298.661);
  --chart-1: oklch(0.267 0.056 298.661);
  --chart-2: oklch(0.342 0.051 124.798);
  --chart-3: oklch(0.342 0.051 124.798);
  --chart-4: oklch(0.378 0.058 124.881);
  --chart-5: oklch(0.264 0.061 298.254);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.024 301.52);
  --foreground: oklch(0.983 0.003 302.171);
  --muted: oklch(0.211 0.024 124.08);
  --muted-foreground: oklch(0.751 0.002 122.263);
  --popover: oklch(0.13 0.024 301.52);
  --popover-foreground: oklch(0.983 0.003 302.171);
  --card: oklch(0.141 0.027 299.967);
  --card-foreground: oklch(0.991 0.001 302.192);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.267 0.056 298.661);
  --primary-foreground: oklch(0.794 0.054 301.152);
  --secondary: oklch(0.342 0.051 124.798);
  --secondary-foreground: oklch(0.867 0.052 123.164);
  --accent: oklch(0.342 0.051 124.798);
  --accent-foreground: oklch(0.867 0.052 123.164);
  --destructive: oklch(0.618 0.207 33.649);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.267 0.056 298.661);
  --chart-1: oklch(0.267 0.056 298.661);
  --chart-2: oklch(0.342 0.051 124.798);
  --chart-3: oklch(0.342 0.051 124.798);
  --chart-4: oklch(0.378 0.058 124.881);
  --chart-5: oklch(0.264 0.061 298.254);
}