Calm for shadcn/ui

Calm is a shadcn/ui theme built around a muted deep violet primary color (#1d191f) with muted deep purple accents (#1f191e). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep violet primary (#1d191f) on a neutral background (#030204).

Color palette

TokenLightDark
Background
#ffffffwhite
#030204black
Foreground
#09020eblack
#fdfcfdwhite
Card
#ffffffwhite
#030204black
Card foreground
#09020eblack
#fdfcfdwhite
Popover
#ffffffwhite
#030204black
Popover foreground
#09020eblack
#fdfcfdwhite
Primary
#1d191fblack
#1d191fblack
Primary foreground
#b7adbdsilver
#b7adbdsilver
Secondary
#1a191fblack
#1a191fblack
Secondary foreground
#afadbddarkgray
#afadbddarkgray
Muted
#dcdaecgainsboro
#151325black
Muted foreground
#525257darkslategray
#a9a8addarkgray
Accent
#1f191eblack
#1f191eblack
Accent foreground
#bdadbbsilver
#bdadbbsilver
Destructive
#6f0d0bmaroon
#ed4845tomato
Destructive foreground
#f8b6b5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1d191fblack
#1d191fblack

Contrast

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

Light mode
Text on background20.45:1AAA
Text on card20.45:1AAA
Primary button8.03:1AAA
Secondary button7.93:1AAA
Muted text5.64:1AA
Accent8.10:1AAA
Destructive7.09:1AAA
Dark mode
Text on background20.28:1AAA
Text on card20.28:1AAA
Primary button8.03:1AAA
Secondary button7.93:1AAA
Muted text7.72:1AAA
Accent8.10:1AAA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.113 0.038 315.034);
  --muted: oklch(0.895 0.025 291.243);
  --muted-foreground: oklch(0.44 0.008 291.426);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.113 0.038 315.034);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.113 0.038 315.034);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.22 0.013 312.582);
  --primary-foreground: oklch(0.761 0.025 312.758);
  --secondary: oklch(0.217 0.012 290.712);
  --secondary-foreground: oklch(0.754 0.023 291.195);
  --accent: oklch(0.223 0.014 329.844);
  --accent-foreground: oklch(0.765 0.027 329.54);
  --destructive: oklch(0.349 0.132 28.071);
  --destructive-foreground: oklch(0.836 0.077 19.929);
  --ring: oklch(0.22 0.013 312.582);
  --chart-1: oklch(0.22 0.013 312.582);
  --chart-2: oklch(0.217 0.012 290.712);
  --chart-3: oklch(0.223 0.014 329.844);
  --chart-4: oklch(0.247 0.015 290.622);
  --chart-5: oklch(0.219 0.017 312.467);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.013 314.301);
  --foreground: oklch(0.992 0.001 312.977);
  --muted: oklch(0.199 0.037 287.934);
  --muted-foreground: oklch(0.735 0.007 291.594);
  --popover: oklch(0.085 0.013 314.301);
  --popover-foreground: oklch(0.992 0.001 312.977);
  --card: oklch(0.085 0.013 314.301);
  --card-foreground: oklch(0.992 0.001 312.977);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.22 0.013 312.582);
  --primary-foreground: oklch(0.761 0.025 312.758);
  --secondary: oklch(0.217 0.012 290.712);
  --secondary-foreground: oklch(0.754 0.023 291.195);
  --accent: oklch(0.223 0.014 329.844);
  --accent-foreground: oklch(0.765 0.027 329.54);
  --destructive: oklch(0.637 0.202 25.78);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.22 0.013 312.582);
  --chart-1: oklch(0.22 0.013 312.582);
  --chart-2: oklch(0.217 0.012 290.712);
  --chart-3: oklch(0.223 0.014 329.844);
  --chart-4: oklch(0.247 0.015 290.622);
  --chart-5: oklch(0.219 0.017 312.467);
}