Divine for shadcn/ui

Divine is a shadcn/ui theme built around a muted deep violet primary color (#0e0a0f) with muted deep purple accents (#0f0a0e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep violet primary (#0e0a0f) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#000000black
#fdfcfdwhite
Card
#ffffffwhite
#000000black
Card foreground
#000000black
#fdfcfdwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#000000black
#fdfcfdwhite
Primary
#0e0a0fblack
#0e0a0fblack
Primary foreground
#ad93b8darkgray
#ad93b8darkgray
Secondary
#0b0a0fblack
#0b0a0fblack
Secondary foreground
#9b93b8darkgray
#9b93b8darkgray
Muted
#e6e2f3lavender
#100c1dblack
Muted foreground
#595760dimgray
#a09fa8darkgray
Accent
#0f0a0eblack
#0f0a0eblack
Accent foreground
#b893b1darkgray
#b893b1darkgray
Destructive
#cf0c0cfirebrick
#f22121crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0e0a0fblack
#0e0a0fblack

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button7.14:1AAA
Secondary button6.81:1AA
Muted text5.60:1AA
Accent7.32:1AAA
Destructive5.64:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button7.14:1AAA
Secondary button6.81:1AA
Muted text7.34:1AAA
Accent7.32:1AAA
Destructive4.18:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.921 0.022 295.134);
  --muted-foreground: oklch(0.463 0.015 294.984);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.153 0.013 315.716);
  --primary-foreground: oklch(0.699 0.061 315.708);
  --secondary: oklch(0.149 0.012 294.112);
  --secondary-foreground: oklch(0.683 0.055 294.059);
  --accent: oklch(0.154 0.013 333.179);
  --accent-foreground: oklch(0.707 0.061 333.225);
  --destructive: oklch(0.54 0.217 28.764);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.153 0.013 315.716);
  --chart-1: oklch(0.153 0.013 315.716);
  --chart-2: oklch(0.149 0.012 294.112);
  --chart-3: oklch(0.154 0.013 333.179);
  --chart-4: oklch(0.18 0.018 293.726);
  --chart-5: oklch(0.152 0.015 315.677);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.002 316.016);
  --muted: oklch(0.169 0.034 291.583);
  --muted-foreground: oklch(0.706 0.013 295.23);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.002 316.016);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.002 316.016);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.153 0.013 315.716);
  --primary-foreground: oklch(0.699 0.061 315.708);
  --secondary: oklch(0.149 0.012 294.112);
  --secondary-foreground: oklch(0.683 0.055 294.059);
  --accent: oklch(0.154 0.013 333.179);
  --accent-foreground: oklch(0.707 0.061 333.225);
  --destructive: oklch(0.614 0.237 27.942);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.153 0.013 315.716);
  --chart-1: oklch(0.153 0.013 315.716);
  --chart-2: oklch(0.149 0.012 294.112);
  --chart-3: oklch(0.154 0.013 333.179);
  --chart-4: oklch(0.18 0.018 293.726);
  --chart-5: oklch(0.152 0.015 315.677);
}