Total for shadcn/ui

Total is a shadcn/ui theme built around a muted green primary color (#6a8165) with muted purple accents (#7b6581). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the muted green primary (#6a8165) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#fcfdfcwhite
#020401black
Foreground
#071604black
#f7f8f7whitesmoke
Card
#fcfdfcwhite
#020401black
Card foreground
#071604black
#f7f8f7whitesmoke
Popover
#fcfdfcwhite
#020401black
Popover foreground
#071604black
#f7f8f7whitesmoke
Primary
#6a8165dimgray
#6a8165dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7b6581gray
#7b6581gray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ded6e0gainsboro
#271f29darkslategray
Muted foreground
#4d4c4ddarkslategray
#b3b2b3darkgray
Accent
#7b6581gray
#7b6581gray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#6b0706maroon
#e9100cred
Destructive foreground
#faa9a8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6a8165dimgray
#6a8165dimgray

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 button4.26:1AA Large
Secondary button5.22:1AA
Muted text6.04:1AA
Accent5.22:1AA
Destructive6.83:1AA
Dark mode
Text on background19.33:1AAA
Text on card19.33:1AAA
Primary button4.26:1AA Large
Secondary button5.22:1AA
Muted text7.58:1AAA
Accent5.22:1AA
Destructive4.63:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.003 139.444);
  --foreground: oklch(0.18 0.043 138.368);
  --muted: oklch(0.886 0.016 319.449);
  --muted-foreground: oklch(0.417 0.003 319.446);
  --popover: oklch(0.993 0.003 139.444);
  --popover-foreground: oklch(0.18 0.043 138.368);
  --card: oklch(0.993 0.003 139.444);
  --card-foreground: oklch(0.18 0.043 138.368);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.576 0.049 139.434);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.538 0.05 319.464);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.538 0.05 319.464);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.336 0.131 28.694);
  --destructive-foreground: oklch(0.814 0.096 20.451);
  --ring: oklch(0.576 0.049 139.434);
  --chart-1: oklch(0.576 0.049 139.434);
  --chart-2: oklch(0.538 0.05 319.464);
  --chart-3: oklch(0.538 0.05 319.464);
  --chart-4: oklch(0.563 0.052 319.464);
  --chart-5: oklch(0.582 0.06 139.438);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.017 137.721);
  --foreground: oklch(0.978 0.003 139.443);
  --muted: oklch(0.252 0.022 319.464);
  --muted-foreground: oklch(0.764 0.003 319.445);
  --popover: oklch(0.098 0.017 137.721);
  --popover-foreground: oklch(0.978 0.003 139.443);
  --card: oklch(0.098 0.017 137.721);
  --card-foreground: oklch(0.978 0.003 139.443);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.576 0.049 139.434);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.538 0.05 319.464);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.538 0.05 319.464);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.589 0.237 29.035);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.576 0.049 139.434);
  --chart-1: oklch(0.576 0.049 139.434);
  --chart-2: oklch(0.538 0.05 319.464);
  --chart-3: oklch(0.538 0.05 319.464);
  --chart-4: oklch(0.563 0.052 319.464);
  --chart-5: oklch(0.582 0.06 139.438);
}