Bewitched for shadcn/ui

Bewitched is a shadcn/ui theme built around a neutral gray primary color (#6a605c) with muted light red accents (#d9cdc9). The light mode uses a neutral background (#fcf9f8). Dark mode keeps the neutral gray primary (#6a605c) on a red-tinted background (#100704).

Color palette

TokenLightDark
Background
#fcf9f8snow
#100704black
Foreground
#000000black
#fdfcfcsnow
Card
#fcf9f8snow
#100704black
Card foreground
#000000black
#fdfcfcsnow
Popover
#fcf9f8snow
#100704black
Popover foreground
#000000black
#fdfcfcsnow
Primary
#6a605cdimgray
#6a605cdimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d9cdc9lightgrey
#343232darkslategray
Secondary foreground
#42332fdarkslategray
#cdcbcblightgrey
Muted
#ded6d3gainsboro
#2c2321darkslategray
Muted foreground
#404040darkslategray
#bfbfbfsilver
Accent
#d9cdc9lightgrey
#343232darkslategray
Accent foreground
#42332fdarkslategray
#cdcbcblightgrey
Destructive
#e62200red
#ff2600orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6a605cdimgray
#6a605cdimgray

Contrast

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

Light mode
Text on background20.01:1AAA
Text on card20.01:1AAA
Primary button6.10:1AA
Secondary button7.74:1AAA
Muted text7.23:1AAA
Accent7.74:1AAA
Destructive4.58:1AA
Dark mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button6.10:1AA
Secondary button7.84:1AAA
Muted text8.32:1AAA
Accent7.84:1AAA
Destructive3.79:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.004 37.723);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.881 0.01 37.688);
  --muted-foreground: oklch(0.371 0 168.69);
  --popover: oklch(0.984 0.004 37.723);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.984 0.004 37.723);
  --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.497 0.015 37.631);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.857 0.014 37.669);
  --secondary-foreground: oklch(0.336 0.023 37.592);
  --accent: oklch(0.857 0.014 37.669);
  --accent-foreground: oklch(0.336 0.023 37.592);
  --destructive: oklch(0.591 0.228 31.338);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.497 0.015 37.631);
  --chart-1: oklch(0.497 0.015 37.631);
  --chart-2: oklch(0.857 0.014 37.669);
  --chart-3: oklch(0.857 0.014 37.669);
  --chart-4: oklch(0.881 0.012 37.681);
  --chart-5: oklch(0.496 0.021 37.606);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.019 43.145);
  --foreground: oklch(0.992 0.002 37.735);
  --muted: oklch(0.266 0.014 37.595);
  --muted-foreground: oklch(0.805 0 169.695);
  --popover: oklch(0.142 0.019 43.145);
  --popover-foreground: oklch(0.992 0.002 37.735);
  --card: oklch(0.142 0.019 43.145);
  --card-foreground: oklch(0.992 0.002 37.735);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.497 0.015 37.631);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.32 0.002 37.706);
  --secondary-foreground: oklch(0.845 0.002 37.731);
  --accent: oklch(0.32 0.002 37.706);
  --accent-foreground: oklch(0.845 0.002 37.731);
  --destructive: oklch(0.639 0.247 31.221);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.497 0.015 37.631);
  --chart-1: oklch(0.497 0.015 37.631);
  --chart-2: oklch(0.32 0.002 37.706);
  --chart-3: oklch(0.32 0.002 37.706);
  --chart-4: oklch(0.35 0.003 37.705);
  --chart-5: oklch(0.496 0.021 37.606);
}