Emerald for shadcn/ui

Emerald is a shadcn/ui theme built around a muted green primary color (#9cbfa6) with muted teal accents (#9cbfb7). The light mode uses a neutral background (#f7fcf9). Dark mode keeps the muted green primary (#9cbfa6) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fcf9mintcream
#000000black
Foreground
#020804black
#f6f9f7whitesmoke
Card
#f7fcf9mintcream
#000000black
Card foreground
#020804black
#f6f9f7whitesmoke
Popover
#f7fcf9mintcream
#000000black
Popover foreground
#020804black
#f6f9f7whitesmoke
Primary
#9cbfa6darkgray
#9cbfa6darkgray
Primary foreground
#101913black
#101913black
Secondary
#a4bf9cdarkseagreen
#a4bf9cdarkseagreen
Secondary foreground
#121910black
#121910black
Muted
#e5e7e4gainsboro
#191b18black
Muted foreground
#3f403fdarkslategray
#bfc0bfsilver
Accent
#9cbfb7darkgray
#9cbfb7darkgray
Accent foreground
#101917black
#101917black
Destructive
#831502maroon
#fb310eorangered
Destructive foreground
#fec3b9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9cbfa6darkgray
#9cbfa6darkgray

Contrast

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

Light mode
Text on background19.54:1AAA
Text on card19.54:1AAA
Primary button8.86:1AAA
Secondary button8.92:1AAA
Muted text8.35:1AAA
Accent8.96:1AAA
Destructive6.63:1AA
Dark mode
Text on background19.81:1AAA
Text on card19.81:1AAA
Primary button8.86:1AAA
Secondary button8.92:1AAA
Muted text9.51:1AAA
Accent8.96:1AAA
Destructive3.77:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.007 155.06);
  --foreground: oklch(0.123 0.02 154.64);
  --muted: oklch(0.925 0.004 138.892);
  --muted-foreground: oklch(0.372 0.003 138.893);
  --popover: oklch(0.988 0.007 155.06);
  --popover-foreground: oklch(0.123 0.02 154.64);
  --card: oklch(0.988 0.007 155.06);
  --card-foreground: oklch(0.123 0.02 154.64);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.771 0.051 153.917);
  --primary-foreground: oklch(0.201 0.018 153.456);
  --secondary: oklch(0.774 0.056 138.927);
  --secondary-foreground: oklch(0.202 0.02 138.949);
  --accent: oklch(0.776 0.038 180.622);
  --accent-foreground: oklch(0.203 0.013 180.118);
  --destructive: oklch(0.394 0.146 32.216);
  --destructive-foreground: oklch(0.867 0.07 29.969);
  --ring: oklch(0.771 0.051 153.917);
  --chart-1: oklch(0.771 0.051 153.917);
  --chart-2: oklch(0.774 0.056 138.927);
  --chart-3: oklch(0.776 0.038 180.622);
  --chart-4: oklch(0.795 0.051 138.921);
  --chart-5: oklch(0.775 0.058 153.735);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.979 0.003 155.126);
  --muted: oklch(0.218 0.006 138.901);
  --muted-foreground: oklch(0.806 0.002 138.892);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.979 0.003 155.126);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.979 0.003 155.126);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.771 0.051 153.917);
  --primary-foreground: oklch(0.201 0.018 153.456);
  --secondary: oklch(0.774 0.056 138.927);
  --secondary-foreground: oklch(0.202 0.02 138.949);
  --accent: oklch(0.776 0.038 180.622);
  --accent-foreground: oklch(0.203 0.013 180.118);
  --destructive: oklch(0.639 0.238 31.729);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.771 0.051 153.917);
  --chart-1: oklch(0.771 0.051 153.917);
  --chart-2: oklch(0.774 0.056 138.927);
  --chart-3: oklch(0.776 0.038 180.622);
  --chart-4: oklch(0.795 0.051 138.921);
  --chart-5: oklch(0.775 0.058 153.735);
}