Fawn for shadcn/ui

Fawn is a shadcn/ui theme built around a deep green primary color (#051f06) with deep purple accents (#1f051e). The light mode uses a neutral background (#fbfdfc). Dark mode keeps the deep green primary (#051f06) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#fbfdfcwhite
#020302black
Foreground
#000000black
#ffffffwhite
Card
#fbfdfcwhite
#020302black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfdfcwhite
#020302black
Popover foreground
#000000black
#ffffffwhite
Primary
#051f06black
#051f06black
Primary foreground
#22ce27limegreen
#22ce27limegreen
Secondary
#1f051eblack
#1f051eblack
Secondary foreground
#e76ee3orchid
#e76ee3orchid
Muted
#f5eaf5whitesmoke
#150a14black
Muted foreground
#5f4f5edimgray
#b0a0b0darkgray
Accent
#1f051eblack
#1f051eblack
Accent foreground
#e76ee3orchid
#e76ee3orchid
Destructive
#8d0902darkred
#f11004red
Destructive foreground
#fec6c3pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#051f06black
#051f06black

Contrast

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

Light mode
Text on background20.62:1AAA
Text on card20.62:1AAA
Primary button8.25:1AAA
Secondary button7.04:1AAA
Muted text6.50:1AA
Accent7.04:1AAA
Destructive6.49:1AA
Dark mode
Text on background20.63:1AAA
Text on card20.63:1AAA
Primary button8.25:1AAA
Secondary button7.04:1AAA
Muted text7.83:1AAA
Accent7.04:1AAA
Destructive4.35:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.003 146.512);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.949 0.018 326.707);
  --muted-foreground: oklch(0.448 0.031 327.126);
  --popover: oklch(0.993 0.003 146.512);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.993 0.003 146.512);
  --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.211 0.057 143.928);
  --primary-foreground: oklch(0.742 0.238 142.96);
  --secondary: oklch(0.178 0.061 329.093);
  --secondary-foreground: oklch(0.723 0.204 328.705);
  --accent: oklch(0.178 0.061 329.093);
  --accent-foreground: oklch(0.723 0.204 328.705);
  --destructive: oklch(0.407 0.162 29.836);
  --destructive-foreground: oklch(0.875 0.065 21.956);
  --ring: oklch(0.211 0.057 143.928);
  --chart-1: oklch(0.211 0.057 143.928);
  --chart-2: oklch(0.178 0.061 329.093);
  --chart-3: oklch(0.178 0.061 329.093);
  --chart-4: oklch(0.215 0.079 329.298);
  --chart-5: oklch(0.212 0.059 143.85);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.011 145.684);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.165 0.028 327.897);
  --muted-foreground: oklch(0.725 0.028 326.867);
  --popover: oklch(0.095 0.011 145.684);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.095 0.011 145.684);
  --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.211 0.057 143.928);
  --primary-foreground: oklch(0.742 0.238 142.96);
  --secondary: oklch(0.178 0.061 329.093);
  --secondary-foreground: oklch(0.723 0.204 328.705);
  --accent: oklch(0.178 0.061 329.093);
  --accent-foreground: oklch(0.723 0.204 328.705);
  --destructive: oklch(0.605 0.244 29.574);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.211 0.057 143.928);
  --chart-1: oklch(0.211 0.057 143.928);
  --chart-2: oklch(0.178 0.061 329.093);
  --chart-3: oklch(0.178 0.061 329.093);
  --chart-4: oklch(0.215 0.079 329.298);
  --chart-5: oklch(0.212 0.059 143.85);
}