Forest for shadcn/ui

Forest is a shadcn/ui theme built around a neutral gray primary color (#d1d1d1) with neutral gray accents (#d0cdcd). The light mode uses a neutral background (#fdf7f7). Dark mode keeps the neutral gray primary (#d1d1d1) on a neutral background (#040202).

Color palette

TokenLightDark
Background
#fdf7f7snow
#040202black
Foreground
#080202black
#fcf8f8snow
Card
#fcf2f2lavenderblush
#070303black
Card foreground
#040101black
#fdfcfcsnow
Popover
#fdf7f7snow
#040202black
Popover foreground
#080202black
#fcf8f8snow
Primary
#d1d1d1lightgrey
#d1d1d1lightgrey
Primary foreground
#383838darkslategray
#383838darkslategray
Secondary
#d0cdcdlightgrey
#2c2525darkslategray
Secondary foreground
#373434darkslategray
#c7bcbcsilver
Muted
#e4d8d8gainsboro
#271b1bblack
Muted foreground
#4c3838darkslategray
#c7b3b3silver
Accent
#d0cdcdlightgrey
#2c2525darkslategray
Accent foreground
#373434darkslategray
#c7bcbcsilver
Destructive
#991b05darkred
#f83412orangered
Destructive foreground
#fed9d2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d1d1d1lightgrey
#d1d1d1lightgrey

Contrast

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

Light mode
Text on background19.38:1AAA
Text on card18.98:1AAA
Primary button7.68:1AAA
Secondary button7.81:1AAA
Muted text7.82:1AAA
Accent7.81:1AAA
Destructive6.37:1AA
Dark mode
Text on background19.68:1AAA
Text on card20.02:1AAA
Primary button7.68:1AAA
Secondary button8.09:1AAA
Muted text8.34:1AAA
Accent8.09:1AAA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 17.28);
  --foreground: oklch(0.103 0.02 21.106);
  --muted: oklch(0.891 0.013 17.404);
  --muted-foreground: oklch(0.364 0.028 18.545);
  --popover: oklch(0.98 0.007 17.28);
  --popover-foreground: oklch(0.103 0.02 21.106);
  --card: oklch(0.97 0.011 17.344);
  --card-foreground: oklch(0.081 0.016 21.106);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.861 0 180);
  --primary-foreground: oklch(0.341 0 158.199);
  --secondary: oklch(0.851 0.003 17.22);
  --secondary-foreground: oklch(0.328 0.005 17.388);
  --accent: oklch(0.851 0.003 17.22);
  --accent-foreground: oklch(0.328 0.005 17.388);
  --destructive: oklch(0.443 0.164 31.933);
  --destructive-foreground: oklch(0.914 0.042 29.699);
  --ring: oklch(0.861 0 180);
  --chart-1: oklch(0.861 0 180);
  --chart-2: oklch(0.851 0.003 17.22);
  --chart-3: oklch(0.851 0.003 17.22);
  --chart-4: oklch(0.875 0.003 17.209);
  --chart-5: oklch(0.859 0.003 17.216);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.009 19.186);
  --foreground: oklch(0.982 0.003 17.217);
  --muted: oklch(0.238 0.019 18.581);
  --muted-foreground: oklch(0.783 0.023 17.651);
  --popover: oklch(0.085 0.009 19.186);
  --popover-foreground: oklch(0.982 0.003 17.217);
  --card: oklch(0.108 0.012 19.186);
  --card-foreground: oklch(0.991 0.002 17.187);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.861 0 180);
  --primary-foreground: oklch(0.341 0 158.199);
  --secondary: oklch(0.273 0.011 17.849);
  --secondary-foreground: oklch(0.805 0.012 17.416);
  --accent: oklch(0.273 0.011 17.849);
  --accent-foreground: oklch(0.805 0.012 17.416);
  --destructive: oklch(0.635 0.233 31.882);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.861 0 180);
  --chart-1: oklch(0.861 0 180);
  --chart-2: oklch(0.273 0.011 17.849);
  --chart-3: oklch(0.273 0.011 17.849);
  --chart-4: oklch(0.303 0.013 17.882);
  --chart-5: oklch(0.859 0.003 17.216);
}