Bewitched for shadcn/ui

Bewitched is a shadcn/ui theme built around a green primary color (#14851b) with teal accents (#148554). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#14851b) on a green-tinted background (#041005).

Color palette

TokenLightDark
Background
#ffffffwhite
#041005black
Foreground
#010401black
#ffffffwhite
Card
#ffffffwhite
#041005black
Card foreground
#010401black
#ffffffwhite
Popover
#ffffffwhite
#041005black
Popover foreground
#010401black
#ffffffwhite
Primary
#14851bforestgreen
#14851bforestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#458514forestgreen
#458514forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eaf2e3beige
#131c0dblack
Muted foreground
#3f443bdarkslategray
#bfc4bbsilver
Accent
#148554seagreen
#148554seagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#b32e14firebrick
#eb6347tomato
Destructive foreground
#fefbfasnow
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#14851bforestgreen
#14851bforestgreen

Contrast

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

Light mode
Text on background20.60:1AAA
Text on card20.60:1AAA
Primary button4.76:1AA
Secondary button4.54:1AA
Muted text8.70:1AAA
Accent4.64:1AA
Destructive6.13:1AA
Dark mode
Text on background19.41:1AAA
Text on card19.41:1AAA
Primary button4.76:1AA
Secondary button4.54:1AA
Muted text9.87:1AAA
Accent4.64:1AA
Destructive6.38:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.097 0.019 146.077);
  --muted: oklch(0.951 0.021 131.283);
  --muted-foreground: oklch(0.38 0.016 131.468);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.097 0.019 146.077);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.097 0.019 146.077);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.538 0.169 143.373);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.553 0.154 135.607);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.546 0.122 157.959);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.508 0.173 32.933);
  --destructive-foreground: oklch(0.991 0.004 31.05);
  --ring: oklch(0.538 0.169 143.373);
  --chart-1: oklch(0.538 0.169 143.373);
  --chart-2: oklch(0.553 0.154 135.607);
  --chart-3: oklch(0.546 0.122 157.959);
  --chart-4: oklch(0.592 0.166 135.679);
  --chart-5: oklch(0.544 0.173 143.284);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.03 145.906);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.212 0.03 132.507);
  --muted-foreground: oklch(0.813 0.014 131.231);
  --popover: oklch(0.157 0.03 145.906);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.157 0.03 145.906);
  --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.538 0.169 143.373);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.553 0.154 135.607);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.546 0.122 157.959);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.665 0.174 33.074);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.538 0.169 143.373);
  --chart-1: oklch(0.538 0.169 143.373);
  --chart-2: oklch(0.553 0.154 135.607);
  --chart-3: oklch(0.546 0.122 157.959);
  --chart-4: oklch(0.592 0.166 135.679);
  --chart-5: oklch(0.544 0.173 143.284);
}