Calm for shadcn/ui

Calm is a shadcn/ui theme built around a deep green primary color (#2c5a1b) with deep pink accents (#5a1b2c). The light mode uses a neutral background (#fcfefb). Dark mode keeps the deep green primary (#2c5a1b) on a green-tinted background (#070a05).

Color palette

TokenLightDark
Background
#fcfefbwhite
#070a05black
Foreground
#060c03black
#f6faf5whitesmoke
Card
#fcfefbwhite
#070a05black
Card foreground
#060c03black
#f6faf5whitesmoke
Popover
#fcfefbwhite
#070a05black
Popover foreground
#060c03black
#f6faf5whitesmoke
Primary
#2c5a1bdarkolivegreen
#2c5a1bdarkolivegreen
Primary foreground
#c9ebbclightgrey
#c9ebbclightgrey
Secondary
#1b2c5amidnightblue
#1b2c5amidnightblue
Secondary foreground
#bcc9eblightsteelblue
#bcc9eblightsteelblue
Muted
#ebeef4lavender
#0b0d14black
Muted foreground
#57585bdimgray
#a4a5a8darkgray
Accent
#5a1b2cmaroon
#5a1b2cmaroon
Accent foreground
#ebbcc9pink
#ebbcc9pink
Destructive
#d10905red
#fa3b38tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2c5a1bdarkolivegreen
#2c5a1bdarkolivegreen

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.49:1AAA
Primary button6.19:1AA
Secondary button8.16:1AAA
Muted text6.10:1AA
Accent7.70:1AAA
Destructive5.60:1AA
Dark mode
Text on background18.88:1AAA
Text on card18.88:1AAA
Primary button6.19:1AA
Secondary button8.16:1AAA
Muted text7.87:1AAA
Accent7.70:1AAA
Destructive3.65: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.994 0.005 137.2);
  --foreground: oklch(0.143 0.025 135.569);
  --muted: oklch(0.948 0.009 270.038);
  --muted-foreground: oklch(0.462 0.004 270.042);
  --popover: oklch(0.994 0.005 137.2);
  --popover-foreground: oklch(0.143 0.025 135.569);
  --card: oklch(0.994 0.005 137.2);
  --card-foreground: oklch(0.143 0.025 135.569);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.421 0.107 138.463);
  --primary-foreground: oklch(0.903 0.072 137.395);
  --secondary: oklch(0.306 0.086 266.36);
  --secondary-foreground: oklch(0.837 0.05 269.53);
  --accent: oklch(0.328 0.094 7.67);
  --accent-foreground: oklch(0.841 0.056 0.616);
  --destructive: oklch(0.542 0.219 29.189);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.421 0.107 138.463);
  --chart-1: oklch(0.421 0.107 138.463);
  --chart-2: oklch(0.306 0.086 266.36);
  --chart-3: oklch(0.328 0.094 7.67);
  --chart-4: oklch(0.331 0.095 266.257);
  --chart-5: oklch(0.425 0.111 138.571);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.014 136.212);
  --foreground: oklch(0.981 0.008 137.209);
  --muted: oklch(0.161 0.015 269.13);
  --muted-foreground: oklch(0.722 0.004 270.076);
  --popover: oklch(0.138 0.014 136.212);
  --popover-foreground: oklch(0.981 0.008 137.209);
  --card: oklch(0.138 0.014 136.212);
  --card-foreground: oklch(0.981 0.008 137.209);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.421 0.107 138.463);
  --primary-foreground: oklch(0.903 0.072 137.395);
  --secondary: oklch(0.306 0.086 266.36);
  --secondary-foreground: oklch(0.837 0.05 269.53);
  --accent: oklch(0.328 0.094 7.67);
  --accent-foreground: oklch(0.841 0.056 0.616);
  --destructive: oklch(0.646 0.226 27.01);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.421 0.107 138.463);
  --chart-1: oklch(0.421 0.107 138.463);
  --chart-2: oklch(0.306 0.086 266.36);
  --chart-3: oklch(0.328 0.094 7.67);
  --chart-4: oklch(0.331 0.095 266.257);
  --chart-5: oklch(0.425 0.111 138.571);
}