Appearance for shadcn/ui

Appearance is a shadcn/ui theme built around a muted green primary color (#7fa479) with muted purple accents (#9e79a4). The light mode uses a neutral background (#f7fdf6). Dark mode keeps the muted green primary (#7fa479) on a green-tinted background (#050c03).

Color palette

TokenLightDark
Background
#f7fdf6mintcream
#050c03black
Foreground
#020401black
#f7f8f6whitesmoke
Card
#f3fdf2honeydew
#061005black
Card foreground
#000000black
#f9fbf9mintcream
Popover
#f3fdf2honeydew
#061005black
Popover foreground
#000000black
#f9fbf9mintcream
Primary
#7fa479darkseagreen
#7fa479darkseagreen
Primary foreground
#000000black
#000000black
Secondary
#9e79a4rosybrown
#9e79a4rosybrown
Secondary foreground
#000000black
#000000black
Muted
#ece9edlavender
#161216black
Muted foreground
#4d4c4ddarkslategray
#b3b2b3darkgray
Accent
#9e79a4rosybrown
#9e79a4rosybrown
Accent foreground
#000000black
#000000black
Destructive
#702c05saddlebrown
#f57429tomato
Destructive foreground
#fbc9acnavajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7fa479darkseagreen
#7fa479darkseagreen

Contrast

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

Light mode
Text on background20.00:1AAA
Text on card20.12:1AAA
Primary button7.50:1AAA
Secondary button5.75:1AA
Muted text7.08:1AAA
Accent5.75:1AA
Destructive6.82:1AA
Dark mode
Text on background18.60:1AAA
Text on card18.64:1AAA
Primary button7.50:1AAA
Secondary button5.75:1AA
Muted text8.75:1AAA
Accent5.75:1AA
Destructive7.38:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.011 141.56);
  --foreground: oklch(0.097 0.016 140.016);
  --muted: oklch(0.937 0.007 321.612);
  --muted-foreground: oklch(0.417 0.003 321.613);
  --popover: oklch(0.983 0.017 141.543);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.017 141.543);
  --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.68 0.074 141.292);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.628 0.076 321.905);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.628 0.076 321.905);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.386 0.106 44.715);
  --destructive-foreground: oklch(0.873 0.069 51.573);
  --ring: oklch(0.68 0.074 141.292);
  --chart-1: oklch(0.68 0.074 141.292);
  --chart-2: oklch(0.628 0.076 321.905);
  --chart-3: oklch(0.628 0.076 321.905);
  --chart-4: oklch(0.655 0.07 321.873);
  --chart-5: oklch(0.686 0.085 141.253);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.026 139.931);
  --foreground: oklch(0.978 0.004 141.582);
  --muted: oklch(0.19 0.01 321.734);
  --muted-foreground: oklch(0.764 0.003 321.602);
  --popover: oklch(0.158 0.03 140.172);
  --popover-foreground: oklch(0.986 0.002 141.585);
  --card: oklch(0.158 0.03 140.172);
  --card-foreground: oklch(0.986 0.002 141.585);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.68 0.074 141.292);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.628 0.076 321.905);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.628 0.076 321.905);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.701 0.179 46.179);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.68 0.074 141.292);
  --chart-1: oklch(0.68 0.074 141.292);
  --chart-2: oklch(0.628 0.076 321.905);
  --chart-3: oklch(0.628 0.076 321.905);
  --chart-4: oklch(0.655 0.07 321.873);
  --chart-5: oklch(0.686 0.085 141.253);
}