Shadowbox for shadcn/ui

Shadowbox is a shadcn/ui theme built around a muted deep violet primary color (#18141a) with muted deep teal accents (#141a18). The light mode uses a neutral background (#fbf8fb). Dark mode keeps the muted deep violet primary (#18141a) on a violet-tinted background (#09040c).

Color palette

TokenLightDark
Background
#fbf8fbsnow
#09040cblack
Foreground
#100614black
#f9f4fawhitesmoke
Card
#fbf8fbsnow
#09040cblack
Card foreground
#100614black
#f9f4fawhitesmoke
Popover
#fbf8fbsnow
#09040cblack
Popover foreground
#100614black
#f9f4fawhitesmoke
Primary
#18141ablack
#18141ablack
Primary foreground
#b5a4bcdarkgray
#b5a4bcdarkgray
Secondary
#1a1814black
#1a1814black
Secondary foreground
#bcb5a4darkgray
#bcb5a4darkgray
Muted
#e4dfd3gainsboro
#2c271bblack
Muted foreground
#5b5852dimgray
#adaaa4darkgray
Accent
#141a18black
#141a18black
Accent foreground
#a4bcb5darkgray
#a4bcb5darkgray
Destructive
#681d08maroon
#f16741tomato
Destructive foreground
#f9bbaalightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#18141ablack
#18141ablack

Contrast

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

Light mode
Text on background18.85:1AAA
Text on card18.85:1AAA
Primary button7.81:1AAA
Secondary button8.65:1AAA
Muted text5.31:1AA
Accent8.74:1AAA
Destructive7.18:1AAA
Dark mode
Text on background18.72:1AAA
Text on card18.72:1AAA
Primary button7.81:1AAA
Secondary button8.65:1AAA
Muted text6.41:1AA
Accent8.74:1AAA
Destructive6.75:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.005 316.005);
  --foreground: oklch(0.145 0.035 315.671);
  --muted: oklch(0.903 0.016 87.505);
  --muted-foreground: oklch(0.462 0.01 87.519);
  --popover: oklch(0.983 0.005 316.005);
  --popover-foreground: oklch(0.145 0.035 315.671);
  --card: oklch(0.983 0.005 316.005);
  --card-foreground: oklch(0.145 0.035 315.671);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.198 0.015 315.743);
  --primary-foreground: oklch(0.741 0.038 315.837);
  --secondary: oklch(0.211 0.01 87.569);
  --secondary-foreground: oklch(0.773 0.024 87.547);
  --accent: oklch(0.212 0.011 175.046);
  --accent-foreground: oklch(0.775 0.028 175.573);
  --destructive: oklch(0.35 0.112 35.417);
  --destructive-foreground: oklch(0.843 0.076 36.023);
  --ring: oklch(0.198 0.015 315.743);
  --chart-1: oklch(0.198 0.015 315.743);
  --chart-2: oklch(0.211 0.01 87.569);
  --chart-3: oklch(0.212 0.011 175.046);
  --chart-4: oklch(0.246 0.012 87.57);
  --chart-5: oklch(0.197 0.019 315.684);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.024 317.56);
  --foreground: oklch(0.973 0.009 315.988);
  --muted: oklch(0.274 0.021 87.507);
  --muted-foreground: oklch(0.738 0.009 87.481);
  --popover: oklch(0.121 0.024 317.56);
  --popover-foreground: oklch(0.973 0.009 315.988);
  --card: oklch(0.121 0.024 317.56);
  --card-foreground: oklch(0.973 0.009 315.988);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.198 0.015 315.743);
  --primary-foreground: oklch(0.741 0.038 315.837);
  --secondary: oklch(0.211 0.01 87.569);
  --secondary-foreground: oklch(0.773 0.024 87.547);
  --accent: oklch(0.212 0.011 175.046);
  --accent-foreground: oklch(0.775 0.028 175.573);
  --destructive: oklch(0.68 0.178 36.272);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.198 0.015 315.743);
  --chart-1: oklch(0.198 0.015 315.743);
  --chart-2: oklch(0.211 0.01 87.569);
  --chart-3: oklch(0.212 0.011 175.046);
  --chart-4: oklch(0.246 0.012 87.57);
  --chart-5: oklch(0.197 0.019 315.684);
}