Calm for shadcn/ui

Calm is a shadcn/ui theme built around a muted yellow primary color (#bdb7a3) with muted blue accents (#a3a9bd). The light mode uses a neutral background (#fdfbf7). Dark mode keeps the muted yellow primary (#bdb7a3) on a yellow-tinted background (#0b0904).

Color palette

TokenLightDark
Background
#fdfbf7snow
#0b0904black
Foreground
#000000black
#fdfdfcwhite
Card
#fcfaf3floralwhite
#0f0c06black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfaf3floralwhite
#0f0c06black
Popover foreground
#000000black
#ffffffwhite
Primary
#bdb7a3darkgray
#bdb7a3darkgray
Primary foreground
#1b1913black
#1b1913black
Secondary
#a3a9bddarkgray
#a3a9bddarkgray
Secondary foreground
#13151bblack
#13151bblack
Muted
#e7eaf4lavender
#0b0f18black
Muted foreground
#4e5365dimgray
#9aa0b1darkgray
Accent
#a3a9bddarkgray
#a3a9bddarkgray
Accent foreground
#13151bblack
#13151bblack
Destructive
#750401maroon
#f40901red
Destructive foreground
#ffaca9lightpink
#ffffffwhite
Border
#e7e5dfgainsboro
#1d1b16black
Input
#e7e5dfgainsboro
#1d1b16black
Ring
#bdb7a3darkgray
#bdb7a3darkgray

Contrast

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

Light mode
Text on background20.37:1AAA
Text on card20.06:1AAA
Primary button8.74:1AAA
Secondary button7.80:1AAA
Muted text6.34:1AA
Accent7.80:1AAA
Destructive6.61:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.49:1AAA
Primary button8.74:1AAA
Secondary button7.80:1AAA
Muted text7.34:1AAA
Accent7.80:1AAA
Destructive4.30:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.006 91.465);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.937 0.013 271.272);
  --muted-foreground: oklch(0.445 0.03 270.674);
  --popover: oklch(0.984 0.01 91.493);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.984 0.01 91.493);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.922 0.009 91.491);
  --input: oklch(0.922 0.009 91.491);
  --primary: oklch(0.778 0.029 91.686);
  --primary-foreground: oklch(0.213 0.011 91.767);
  --secondary: oklch(0.737 0.03 270.985);
  --secondary-foreground: oklch(0.196 0.012 270.728);
  --accent: oklch(0.737 0.03 270.985);
  --accent-foreground: oklch(0.196 0.012 270.728);
  --destructive: oklch(0.355 0.142 29.82);
  --destructive-foreground: oklch(0.823 0.098 21.592);
  --ring: oklch(0.778 0.029 91.686);
  --chart-1: oklch(0.778 0.029 91.686);
  --chart-2: oklch(0.737 0.03 270.985);
  --chart-3: oklch(0.737 0.03 270.985);
  --chart-4: oklch(0.763 0.027 271.049);
  --chart-5: oklch(0.782 0.034 91.719);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.013 95.199);
  --foreground: oklch(0.993 0.001 91.414);
  --muted: oklch(0.168 0.021 269.866);
  --muted-foreground: oklch(0.707 0.026 271.028);
  --popover: oklch(0.157 0.015 93.297);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.157 0.015 93.297);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.224 0.011 91.75);
  --input: oklch(0.224 0.011 91.75);
  --primary: oklch(0.778 0.029 91.686);
  --primary-foreground: oklch(0.213 0.011 91.767);
  --secondary: oklch(0.737 0.03 270.985);
  --secondary-foreground: oklch(0.196 0.012 270.728);
  --accent: oklch(0.737 0.03 270.985);
  --accent-foreground: oklch(0.196 0.012 270.728);
  --destructive: oklch(0.608 0.247 29.473);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.778 0.029 91.686);
  --chart-1: oklch(0.778 0.029 91.686);
  --chart-2: oklch(0.737 0.03 270.985);
  --chart-3: oklch(0.737 0.03 270.985);
  --chart-4: oklch(0.763 0.027 271.049);
  --chart-5: oklch(0.782 0.034 91.719);
}