Dear for shadcn/ui

Dear is a shadcn/ui theme built around a muted light green primary color (#c9d4b9) with muted light green accents (#bbd4b9). The light mode uses a neutral background (#fafdf7). Dark mode keeps the muted light green primary (#c9d4b9) on a neutral background (#050803).

Color palette

TokenLightDark
Background
#fafdf7mintcream
#050803black
Foreground
#030501black
#f8f9f6whitesmoke
Card
#f8fcf3whitesmoke
#080b04black
Card foreground
#000000black
#fafbf9snow
Popover
#fafdf7mintcream
#050803black
Popover foreground
#030501black
#f8f9f6whitesmoke
Primary
#c9d4b9silver
#c9d4b9silver
Primary foreground
#2f3923darkslategray
#2f3923darkslategray
Secondary
#d4d3b9lightgrey
#d4d3b9lightgrey
Secondary foreground
#393723darkslategray
#393723darkslategray
Muted
#f3f2e8linen
#17170cblack
Muted foreground
#63624fdimgray
#b0ae9cdarkgray
Accent
#bbd4b9silver
#bbd4b9silver
Accent foreground
#243923darkslategray
#243923darkslategray
Destructive
#a13312brown
#eb6d47tomato
Destructive foreground
#fcede8linen
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c9d4b9silver
#c9d4b9silver

Contrast

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

Light mode
Text on background19.93:1AAA
Text on card20.17:1AAA
Primary button7.87:1AAA
Secondary button7.90:1AAA
Muted text5.50:1AA
Accent7.88:1AAA
Destructive6.15:1AA
Dark mode
Text on background19.08:1AAA
Text on card19.04:1AAA
Primary button7.87:1AAA
Secondary button7.90:1AAA
Muted text8.06:1AAA
Accent7.88:1AAA
Destructive6.81:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.008 125.851);
  --foreground: oklch(0.104 0.021 124.617);
  --muted: oklch(0.959 0.014 103.344);
  --muted-foreground: oklch(0.491 0.028 104.01);
  --popover: oklch(0.99 0.008 125.851);
  --popover-foreground: oklch(0.104 0.021 124.617);
  --card: oklch(0.985 0.012 125.907);
  --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.855 0.039 126.352);
  --primary-foreground: oklch(0.329 0.039 127.456);
  --secondary: oklch(0.86 0.034 103.741);
  --secondary-foreground: oklch(0.334 0.034 104.595);
  --accent: oklch(0.845 0.046 143.346);
  --accent-foreground: oklch(0.32 0.047 142.841);
  --destructive: oklch(0.48 0.151 36.231);
  --destructive-foreground: oklch(0.957 0.018 37.661);
  --ring: oklch(0.855 0.039 126.352);
  --chart-1: oklch(0.855 0.039 126.352);
  --chart-2: oklch(0.86 0.034 103.741);
  --chart-3: oklch(0.845 0.046 143.346);
  --chart-4: oklch(0.88 0.029 103.645);
  --chart-5: oklch(0.858 0.043 126.427);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.126 0.017 124.963);
  --foreground: oklch(0.98 0.004 125.792);
  --muted: oklch(0.2 0.019 104.539);
  --muted-foreground: oklch(0.748 0.026 103.663);
  --popover: oklch(0.126 0.017 124.963);
  --popover-foreground: oklch(0.98 0.004 125.792);
  --card: oklch(0.145 0.02 125.124);
  --card-foreground: oklch(0.986 0.003 125.774);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.855 0.039 126.352);
  --primary-foreground: oklch(0.329 0.039 127.456);
  --secondary: oklch(0.86 0.034 103.741);
  --secondary-foreground: oklch(0.334 0.034 104.595);
  --accent: oklch(0.845 0.046 143.346);
  --accent-foreground: oklch(0.32 0.047 142.841);
  --destructive: oklch(0.68 0.164 37.537);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.855 0.039 126.352);
  --chart-1: oklch(0.855 0.039 126.352);
  --chart-2: oklch(0.86 0.034 103.741);
  --chart-3: oklch(0.845 0.046 143.346);
  --chart-4: oklch(0.88 0.029 103.645);
  --chart-5: oklch(0.858 0.043 126.427);
}