Few for shadcn/ui

Few is a shadcn/ui theme built around a deep green primary color (#136324) with muted light green accents (#ccdbcf). The light mode uses a neutral background (#f8fcf9). Dark mode keeps the deep green primary (#136324) on a green-tinted background (#030c05).

Color palette

TokenLightDark
Background
#f8fcf9mintcream
#030c05black
Foreground
#061309black
#f9fbf9mintcream
Card
#f8fcf9mintcream
#030c05black
Card foreground
#061309black
#f9fbf9mintcream
Popover
#f8fcf9mintcream
#030c05black
Popover foreground
#061309black
#f9fbf9mintcream
Primary
#136324darkgreen
#136324darkgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#ccdbcflightgrey
#27352adarkslategray
Secondary foreground
#304535darkslategray
#bed0c2silver
Muted
#e1eae3gainsboro
#151e17black
Muted foreground
#595959dimgray
#a6a6a6darkgray
Accent
#ccdbcflightgrey
#27352adarkslategray
Accent foreground
#304535darkslategray
#bed0c2silver
Destructive
#642907saddlebrown
#ee6211chocolate
Destructive foreground
#f9c3a4navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#136324darkgreen
#136324darkgreen

Contrast

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

Light mode
Text on background18.32:1AAA
Text on card18.32:1AAA
Primary button7.44:1AAA
Secondary button7.22:1AAA
Muted text5.70:1AA
Accent7.22:1AAA
Destructive7.16:1AAA
Dark mode
Text on background19.05:1AAA
Text on card19.05:1AAA
Primary button7.44:1AAA
Secondary button7.96:1AAA
Muted text6.99:1AA
Accent7.96:1AAA
Destructive6.40:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 152.533);
  --foreground: oklch(0.172 0.029 150.351);
  --muted: oklch(0.929 0.014 152.371);
  --muted-foreground: oklch(0.465 0 180);
  --popover: oklch(0.987 0.005 152.533);
  --popover-foreground: oklch(0.172 0.029 150.351);
  --card: oklch(0.987 0.005 152.533);
  --card-foreground: oklch(0.172 0.029 150.351);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.437 0.121 146.397);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.878 0.024 152.19);
  --secondary-foreground: oklch(0.368 0.039 150.817);
  --accent: oklch(0.878 0.024 152.19);
  --accent-foreground: oklch(0.368 0.039 150.817);
  --destructive: oklch(0.36 0.095 45.538);
  --destructive-foreground: oklch(0.858 0.074 51.476);
  --ring: oklch(0.437 0.121 146.397);
  --chart-1: oklch(0.437 0.121 146.397);
  --chart-2: oklch(0.878 0.024 152.19);
  --chart-3: oklch(0.878 0.024 152.19);
  --chart-4: oklch(0.899 0.019 152.277);
  --chart-5: oklch(0.442 0.125 146.182);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.025 151.625);
  --foreground: oklch(0.986 0.003 152.564);
  --muted: oklch(0.224 0.02 151.098);
  --muted-foreground: oklch(0.724 0 180);
  --popover: oklch(0.141 0.025 151.625);
  --popover-foreground: oklch(0.986 0.003 152.564);
  --card: oklch(0.141 0.025 151.625);
  --card-foreground: oklch(0.986 0.003 152.564);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.437 0.121 146.397);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.313 0.028 151.098);
  --secondary-foreground: oklch(0.84 0.027 152.096);
  --accent: oklch(0.313 0.028 151.098);
  --accent-foreground: oklch(0.84 0.027 152.096);
  --destructive: oklch(0.666 0.19 43.462);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.437 0.121 146.397);
  --chart-1: oklch(0.437 0.121 146.397);
  --chart-2: oklch(0.313 0.028 151.098);
  --chart-3: oklch(0.313 0.028 151.098);
  --chart-4: oklch(0.345 0.032 151.046);
  --chart-5: oklch(0.442 0.125 146.182);
}