Unit for shadcn/ui

Unit is a shadcn/ui theme built around a muted green primary color (#b5c5b9) with muted orange accents (#c5b9b5). The light mode uses a neutral background (#fbfefc). Dark mode keeps the muted green primary (#b5c5b9) on a green-tinted background (#030c06).

Color palette

TokenLightDark
Background
#fbfefcwhite
#030c06black
Foreground
#051008black
#ffffffwhite
Card
#f8fcf9mintcream
#041008black
Card foreground
#040c06black
#ffffffwhite
Popover
#f8fcf9mintcream
#041008black
Popover foreground
#040c06black
#ffffffwhite
Primary
#b5c5b9silver
#b5c5b9silver
Primary foreground
#1f2822black
#1f2822black
Secondary
#b9b5c5silver
#b9b5c5silver
Secondary foreground
#221f28black
#221f28black
Muted
#ecebeflavender
#111014black
Muted foreground
#565260dimgray
#a39faddarkgray
Accent
#c5b9b5silver
#c5b9b5silver
Accent foreground
#28221fblack
#28221fblack
Destructive
#cb5815chocolate
#e86d26chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b5c5b9silver
#b5c5b9silver

Contrast

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

Light mode
Text on background19.04:1AAA
Text on card19.13:1AAA
Primary button8.38:1AAA
Secondary button8.08:1AAA
Muted text6.38:1AA
Accent8.20:1AAA
Destructive4.24:1AA Large
Dark mode
Text on background19.81:1AAA
Text on card19.37:1AAA
Primary button8.38:1AAA
Secondary button8.08:1AAA
Muted text7.34:1AAA
Accent8.20:1AAA
Destructive6.66:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 155.133);
  --foreground: oklch(0.157 0.024 153.688);
  --muted: oklch(0.942 0.006 299.198);
  --muted-foreground: oklch(0.448 0.024 298.397);
  --popover: oklch(0.987 0.006 155.073);
  --popover-foreground: oklch(0.141 0.021 154.561);
  --card: oklch(0.987 0.006 155.073);
  --card-foreground: oklch(0.141 0.021 154.561);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.807 0.024 154.646);
  --primary-foreground: oklch(0.266 0.017 153.991);
  --secondary: oklch(0.781 0.023 298.802);
  --secondary-foreground: oklch(0.247 0.016 298.157);
  --accent: oklch(0.795 0.014 42.973);
  --accent-foreground: oklch(0.257 0.01 42.817);
  --destructive: oklch(0.598 0.163 44.818);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.807 0.024 154.646);
  --chart-1: oklch(0.807 0.024 154.646);
  --chart-2: oklch(0.781 0.023 298.802);
  --chart-3: oklch(0.795 0.014 42.973);
  --chart-4: oklch(0.807 0.02 298.878);
  --chart-5: oklch(0.809 0.029 154.509);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.023 154.466);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.175 0.009 298.424);
  --muted-foreground: oklch(0.709 0.021 298.796);
  --popover: oklch(0.158 0.026 153.553);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.158 0.026 153.553);
  --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.807 0.024 154.646);
  --primary-foreground: oklch(0.266 0.017 153.991);
  --secondary: oklch(0.781 0.023 298.802);
  --secondary-foreground: oklch(0.247 0.016 298.157);
  --accent: oklch(0.795 0.014 42.973);
  --accent-foreground: oklch(0.257 0.01 42.817);
  --destructive: oklch(0.673 0.172 46.184);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.807 0.024 154.646);
  --chart-1: oklch(0.807 0.024 154.646);
  --chart-2: oklch(0.781 0.023 298.802);
  --chart-3: oklch(0.795 0.014 42.973);
  --chart-4: oklch(0.807 0.02 298.878);
  --chart-5: oklch(0.809 0.029 154.509);
}