Fifth for shadcn/ui

Fifth is a shadcn/ui theme built around a deep green primary color (#051909) with neutral gray accents (#d1d6d2). The light mode uses a neutral background (#fbfdfc). Dark mode keeps the deep green primary (#051909) on a green-tinted background (#060e08).

Color palette

TokenLightDark
Background
#fbfdfcwhite
#060e08black
Foreground
#000000black
#fcfdfcwhite
Card
#f8fcf9mintcream
#08120ablack
Card foreground
#000000black
#ffffffwhite
Popover
#fbfdfcwhite
#060e08black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#051909black
#051909black
Primary foreground
#28c344limegreen
#28c344limegreen
Secondary
#d1d6d2lightgrey
#1a1f1ablack
Secondary foreground
#373e38darkslategray
#aebcb1darkgray
Muted
#e8f2eahoneydew
#0d170fblack
Muted foreground
#495f4ddarkslategray
#a0b6a4darkgray
Accent
#d1d6d2lightgrey
#1a1f1ablack
Accent foreground
#373e38darkslategray
#aebcb1darkgray
Destructive
#df0a07red
#e40b07red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#051909black
#051909black

Contrast

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

Light mode
Text on background20.62:1AAA
Text on card20.26:1AAA
Primary button7.78:1AAA
Secondary button7.48:1AAA
Muted text6.06:1AA
Accent7.48:1AAA
Destructive5.03:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.09:1AAA
Primary button7.78:1AAA
Secondary button8.50:1AAA
Muted text8.48:1AAA
Accent8.50:1AAA
Destructive4.84:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.003 151.364);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.952 0.016 151.169);
  --muted-foreground: oklch(0.462 0.039 150.117);
  --popover: oklch(0.993 0.003 151.364);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.987 0.006 151.32);
  --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.193 0.042 148.247);
  --primary-foreground: oklch(0.714 0.209 145.366);
  --secondary: oklch(0.872 0.008 151.274);
  --secondary-foreground: oklch(0.356 0.014 150.848);
  --accent: oklch(0.872 0.008 151.274);
  --accent-foreground: oklch(0.356 0.014 150.848);
  --destructive: oklch(0.569 0.23 29.153);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.193 0.042 148.247);
  --chart-1: oklch(0.193 0.042 148.247);
  --chart-2: oklch(0.872 0.008 151.274);
  --chart-3: oklch(0.872 0.008 151.274);
  --chart-4: oklch(0.895 0.007 151.301);
  --chart-5: oklch(0.194 0.044 148.169);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.154 0.02 150.283);
  --foreground: oklch(0.993 0.001 151.393);
  --muted: oklch(0.191 0.023 149.531);
  --muted-foreground: oklch(0.754 0.035 150.723);
  --popover: oklch(0.154 0.02 150.283);
  --popover-foreground: oklch(0.993 0.001 151.393);
  --card: oklch(0.168 0.023 149.601);
  --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.193 0.042 148.247);
  --primary-foreground: oklch(0.714 0.209 145.366);
  --secondary: oklch(0.231 0.011 150.713);
  --secondary-foreground: oklch(0.781 0.021 151.013);
  --accent: oklch(0.231 0.011 150.713);
  --accent-foreground: oklch(0.781 0.021 151.013);
  --destructive: oklch(0.579 0.234 29.156);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.193 0.042 148.247);
  --chart-1: oklch(0.193 0.042 148.247);
  --chart-2: oklch(0.231 0.011 150.713);
  --chart-3: oklch(0.231 0.011 150.713);
  --chart-4: oklch(0.264 0.013 150.66);
  --chart-5: oklch(0.194 0.044 148.169);
}