Malnutrition for shadcn/ui

Malnutrition is a shadcn/ui theme built around a muted green primary color (#9bb998) with muted red accents (#b9989b). The light mode uses a neutral background (#f9fcf8). Dark mode keeps the muted green primary (#9bb998) on a green-tinted background (#060f05).

Color palette

TokenLightDark
Background
#f9fcf8mintcream
#060f05black
Foreground
#071405black
#ffffffwhite
Card
#f9fcf8mintcream
#060f05black
Card foreground
#071405black
#ffffffwhite
Popover
#f9fcf8mintcream
#060f05black
Popover foreground
#071405black
#ffffffwhite
Primary
#9bb998darkseagreen
#9bb998darkseagreen
Primary foreground
#0d120cblack
#0d120cblack
Secondary
#989bb9darkgray
#989bb9darkgray
Secondary foreground
#0c0d12black
#0c0d12black
Muted
#d9dae8gainsboro
#171826black
Muted foreground
#3c3e48darkslategray
#b7b8c3silver
Accent
#b9989brosybrown
#b9989brosybrown
Accent foreground
#120c0dblack
#120c0dblack
Destructive
#990a0adarkred
#f11e1ecrimson
Destructive foreground
#fdd9d9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9bb998darkseagreen
#9bb998darkseagreen

Contrast

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

Light mode
Text on background18.21:1AAA
Text on card18.21:1AAA
Primary button8.80:1AAA
Secondary button7.14:1AAA
Muted text7.67:1AAA
Accent7.38:1AAA
Destructive6.68:1AA
Dark mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button8.80:1AAA
Secondary button7.14:1AAA
Muted text8.88:1AAA
Accent7.38:1AAA
Destructive4.26:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.005 142.605);
  --foreground: oklch(0.174 0.036 141.267);
  --muted: oklch(0.892 0.019 280.94);
  --muted-foreground: oklch(0.365 0.018 280.424);
  --popover: oklch(0.987 0.005 142.605);
  --popover-foreground: oklch(0.174 0.036 141.267);
  --card: oklch(0.987 0.005 142.605);
  --card-foreground: oklch(0.174 0.036 141.267);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.754 0.057 142.318);
  --primary-foreground: oklch(0.175 0.014 142.29);
  --secondary: oklch(0.697 0.043 280.21);
  --secondary-foreground: oklch(0.161 0.011 280.089);
  --accent: oklch(0.71 0.04 11.351);
  --accent-foreground: oklch(0.164 0.01 11.485);
  --destructive: oklch(0.434 0.172 28.511);
  --destructive-foreground: oklch(0.914 0.04 17.909);
  --ring: oklch(0.754 0.057 142.318);
  --chart-1: oklch(0.754 0.057 142.318);
  --chart-2: oklch(0.697 0.043 280.21);
  --chart-3: oklch(0.71 0.04 11.351);
  --chart-4: oklch(0.725 0.039 280.362);
  --chart-5: oklch(0.758 0.065 142.272);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.027 141.293);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.216 0.027 278.974);
  --muted-foreground: oklch(0.785 0.015 280.97);
  --popover: oklch(0.156 0.027 141.293);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.156 0.027 141.293);
  --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.754 0.057 142.318);
  --primary-foreground: oklch(0.175 0.014 142.29);
  --secondary: oklch(0.697 0.043 280.21);
  --secondary-foreground: oklch(0.161 0.011 280.089);
  --accent: oklch(0.71 0.04 11.351);
  --accent-foreground: oklch(0.164 0.01 11.485);
  --destructive: oklch(0.61 0.238 28.134);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.754 0.057 142.318);
  --chart-1: oklch(0.754 0.057 142.318);
  --chart-2: oklch(0.697 0.043 280.21);
  --chart-3: oklch(0.71 0.04 11.351);
  --chart-4: oklch(0.725 0.039 280.362);
  --chart-5: oklch(0.758 0.065 142.272);
}