Boxspring for shadcn/ui

Boxspring is a shadcn/ui theme built around a light violet primary color (#ded0f0) with light purple accents (#eed0f0). The light mode uses a neutral background (#faf8fc). Dark mode keeps the light violet primary (#ded0f0) on a violet-tinted background (#07050a).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#07050ablack
Foreground
#000000black
#fcfcfdwhite
Card
#f7f4fawhitesmoke
#0a060eblack
Card foreground
#000000black
#ffffffwhite
Popover
#faf8fcghostwhite
#07050ablack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#ded0f0gainsboro
#ded0f0gainsboro
Primary foreground
#41226ddarkslateblue
#41226ddarkslateblue
Secondary
#d0d3f0gainsboro
#d0d3f0gainsboro
Secondary foreground
#22286dmidnightblue
#22286dmidnightblue
Muted
#d1d2e1lightgrey
#1e202edarkslategray
Muted foreground
#404144darkslategray
#bbbbbfsilver
Accent
#eed0f0lavender
#eed0f0lavender
Accent foreground
#66226dpurple
#66226dpurple
Destructive
#900804darkred
#f92b24crimson
Destructive foreground
#fecac8pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ded0f0gainsboro
#ded0f0gainsboro

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.30:1AAA
Primary button8.61:1AAA
Secondary button8.97:1AAA
Muted text6.80:1AA
Accent7.42:1AAA
Destructive6.50:1AA
Dark mode
Text on background19.79:1AAA
Text on card20.06:1AAA
Primary button8.61:1AAA
Secondary button8.97:1AAA
Muted text8.45:1AAA
Accent7.42:1AAA
Destructive3.87:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.006 304.963);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.867 0.02 281.816);
  --muted-foreground: oklch(0.375 0.006 281.935);
  --popover: oklch(0.981 0.006 304.963);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.972 0.009 304.92);
  --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.88 0.045 304.331);
  --primary-foreground: oklch(0.337 0.123 298.744);
  --secondary: oklch(0.874 0.04 281.413);
  --secondary-foreground: oklch(0.319 0.117 273.762);
  --accent: oklch(0.893 0.053 323.402);
  --accent-foreground: oklch(0.388 0.137 324.311);
  --destructive: oklch(0.414 0.165 29.425);
  --destructive-foreground: oklch(0.884 0.059 20.629);
  --ring: oklch(0.88 0.045 304.331);
  --chart-1: oklch(0.88 0.045 304.331);
  --chart-2: oklch(0.874 0.04 281.413);
  --chart-3: oklch(0.893 0.053 323.402);
  --chart-4: oklch(0.906 0.03 281.648);
  --chart-5: oklch(0.878 0.048 304.288);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.122 0.016 305.736);
  --foreground: oklch(0.992 0.001 305.029);
  --muted: oklch(0.247 0.028 280.106);
  --muted-foreground: oklch(0.793 0.005 282.105);
  --popover: oklch(0.122 0.016 305.736);
  --popover-foreground: oklch(0.992 0.001 305.029);
  --card: oklch(0.134 0.018 304.666);
  --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.88 0.045 304.331);
  --primary-foreground: oklch(0.337 0.123 298.744);
  --secondary: oklch(0.874 0.04 281.413);
  --secondary-foreground: oklch(0.319 0.117 273.762);
  --accent: oklch(0.893 0.053 323.402);
  --accent-foreground: oklch(0.388 0.137 324.311);
  --destructive: oklch(0.633 0.238 28.573);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.88 0.045 304.331);
  --chart-1: oklch(0.88 0.045 304.331);
  --chart-2: oklch(0.874 0.04 281.413);
  --chart-3: oklch(0.893 0.053 323.402);
  --chart-4: oklch(0.906 0.03 281.648);
  --chart-5: oklch(0.878 0.048 304.288);
}