Whole for shadcn/ui

Whole is a shadcn/ui theme built around a vivid deep green primary color (#0b3706) with vivid deep purple accents (#320637). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the vivid deep green primary (#0b3706) on a green-tinted background (#040c03).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#040c03black
Foreground
#040c04black
#f7f8f6whitesmoke
Card
#f4fbf3whitesmoke
#061004black
Card foreground
#030802black
#f9fbf9mintcream
Popover
#f4fbf3whitesmoke
#061004black
Popover foreground
#030802black
#f9fbf9mintcream
Primary
#0b3706darkgreen
#0b3706darkgreen
Primary foreground
#37e524limegreen
#37e524limegreen
Secondary
#320637midnightblue
#320637midnightblue
Secondary foreground
#e57ff0violet
#e57ff0violet
Muted
#eee0f0lavender
#1d0f1fblack
Muted foreground
#474747darkslategray
#b8b8b8silver
Accent
#320637midnightblue
#320637midnightblue
Accent foreground
#e57ff0violet
#e57ff0violet
Destructive
#b23106firebrick
#f96534tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0b3706darkgreen
#0b3706darkgreen

Contrast

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

Light mode
Text on background19.18:1AAA
Text on card19.23:1AAA
Primary button7.94:1AAA
Secondary button7.08:1AAA
Muted text7.34:1AAA
Accent7.08:1AAA
Destructive6.30:1AA
Dark mode
Text on background18.61:1AAA
Text on card18.64:1AAA
Primary button7.94:1AAA
Secondary button7.08:1AAA
Muted text9.26:1AAA
Accent7.08:1AAA
Destructive6.94:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.009 142.592);
  --foreground: oklch(0.14 0.025 141.022);
  --muted: oklch(0.923 0.025 322.734);
  --muted-foreground: oklch(0.399 0 180);
  --popover: oklch(0.982 0.013 142.574);
  --popover-foreground: oklch(0.122 0.022 140.999);
  --card: oklch(0.982 0.013 142.574);
  --card-foreground: oklch(0.122 0.022 140.999);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.295 0.089 141.604);
  --primary-foreground: oklch(0.806 0.258 141.837);
  --secondary: oklch(0.234 0.096 323.554);
  --secondary-foreground: oklch(0.748 0.187 323.453);
  --accent: oklch(0.234 0.096 323.554);
  --accent-foreground: oklch(0.748 0.187 323.453);
  --destructive: oklch(0.508 0.172 35.649);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.295 0.089 141.604);
  --chart-1: oklch(0.295 0.089 141.604);
  --chart-2: oklch(0.234 0.096 323.554);
  --chart-3: oklch(0.234 0.096 323.554);
  --chart-4: oklch(0.269 0.113 323.477);
  --chart-5: oklch(0.298 0.091 141.565);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.141 0.026 140.934);
  --foreground: oklch(0.978 0.003 142.615);
  --muted: oklch(0.196 0.036 323.28);
  --muted-foreground: oklch(0.781 0 180);
  --popover: oklch(0.158 0.031 141.097);
  --popover-foreground: oklch(0.985 0.002 142.619);
  --card: oklch(0.158 0.031 141.097);
  --card-foreground: oklch(0.985 0.002 142.619);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.295 0.089 141.604);
  --primary-foreground: oklch(0.806 0.258 141.837);
  --secondary: oklch(0.234 0.096 323.554);
  --secondary-foreground: oklch(0.748 0.187 323.453);
  --accent: oklch(0.234 0.096 323.554);
  --accent-foreground: oklch(0.748 0.187 323.453);
  --destructive: oklch(0.688 0.191 38.089);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.295 0.089 141.604);
  --chart-1: oklch(0.295 0.089 141.604);
  --chart-2: oklch(0.234 0.096 323.554);
  --chart-3: oklch(0.234 0.096 323.554);
  --chart-4: oklch(0.269 0.113 323.477);
  --chart-5: oklch(0.298 0.091 141.565);
}