Dear for shadcn/ui

Dear is a shadcn/ui theme built around a green primary color (#61bb30) with green accents (#30bb45). The light mode uses a neutral background (#f9fdf7). Dark mode keeps the green primary (#61bb30) on a green-tinted background (#090f05).

Color palette

TokenLightDark
Background
#f9fdf7mintcream
#090f05black
Foreground
#040802black
#fcfdfcwhite
Card
#f6fbf3whitesmoke
#0b1307black
Card foreground
#020401black
#ffffffwhite
Popover
#f9fdf7mintcream
#090f05black
Popover foreground
#040802black
#fcfdfcwhite
Primary
#61bb30olivedrab
#61bb30olivedrab
Primary foreground
#0d1806black
#0d1806black
Secondary
#a6bb30yellowgreen
#a6bb30yellowgreen
Secondary foreground
#161806black
#161806black
Muted
#f4f4f0whitesmoke
#0e0f0bblack
Muted foreground
#6c6f58dimgray
#a4a790darkgray
Accent
#30bb45limegreen
#30bb45limegreen
Accent foreground
#061809black
#061809black
Destructive
#91110ddarkred
#ef4943tomato
Destructive foreground
#fbd6d5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#61bb30olivedrab
#61bb30olivedrab

Contrast

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

Light mode
Text on background19.58:1AAA
Text on card19.67:1AAA
Primary button7.48:1AAA
Secondary button8.33:1AAA
Muted text4.70:1AA
Accent7.24:1AAA
Destructive6.82:1AA
Dark mode
Text on background19.01:1AAA
Text on card18.91:1AAA
Primary button7.48:1AAA
Secondary button8.33:1AAA
Muted text7.80:1AAA
Accent7.24:1AAA
Destructive3.68:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.008 134.266);
  --foreground: oklch(0.126 0.021 132.615);
  --muted: oklch(0.966 0.005 113.411);
  --muted-foreground: oklch(0.533 0.036 114.566);
  --popover: oklch(0.989 0.008 134.266);
  --popover-foreground: oklch(0.126 0.021 132.615);
  --card: oklch(0.983 0.012 134.29);
  --card-foreground: oklch(0.1 0.017 132.615);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.708 0.191 137.024);
  --primary-foreground: oklch(0.193 0.038 135.237);
  --secondary: oklch(0.75 0.158 117.949);
  --secondary-foreground: oklch(0.202 0.033 116.303);
  --accent: oklch(0.694 0.197 145.193);
  --accent-foreground: oklch(0.19 0.039 147.5);
  --destructive: oklch(0.421 0.162 28.819);
  --destructive-foreground: oklch(0.907 0.042 20.293);
  --ring: oklch(0.708 0.191 137.024);
  --chart-1: oklch(0.708 0.191 137.024);
  --chart-2: oklch(0.75 0.158 117.949);
  --chart-3: oklch(0.694 0.197 145.193);
  --chart-4: oklch(0.786 0.166 117.971);
  --chart-5: oklch(0.716 0.198 137.201);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.159 0.024 133.699);
  --foreground: oklch(0.993 0.002 134.232);
  --muted: oklch(0.165 0.008 114.245);
  --muted-foreground: oklch(0.72 0.034 114.178);
  --popover: oklch(0.159 0.024 133.699);
  --popover-foreground: oklch(0.993 0.002 134.232);
  --card: oklch(0.174 0.028 134.667);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.708 0.191 137.024);
  --primary-foreground: oklch(0.193 0.038 135.237);
  --secondary: oklch(0.75 0.158 117.949);
  --secondary-foreground: oklch(0.202 0.033 116.303);
  --accent: oklch(0.694 0.197 145.193);
  --accent-foreground: oklch(0.19 0.039 147.5);
  --destructive: oklch(0.641 0.203 26.621);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.708 0.191 137.024);
  --chart-1: oklch(0.708 0.191 137.024);
  --chart-2: oklch(0.75 0.158 117.949);
  --chart-3: oklch(0.694 0.197 145.193);
  --chart-4: oklch(0.786 0.166 117.971);
  --chart-5: oklch(0.716 0.198 137.201);
}