Nutmeg for shadcn/ui

Nutmeg is a shadcn/ui theme built around a red primary color (#a53327) with indigo accents (#3327a5). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the red primary (#a53327) on a neutral background (#040201).

Color palette

TokenLightDark
Background
#fdfcfcsnow
#040201black
Foreground
#110403black
#fdfcfcsnow
Card
#fbf9f8snow
#070303black
Card foreground
#0d0302black
#ffffffwhite
Popover
#fdfcfcsnow
#040201black
Popover foreground
#110403black
#fdfcfcsnow
Primary
#a53327brown
#a53327brown
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#27a533forestgreen
#27a533forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d6e1d7gainsboro
#1e291fblack
Muted foreground
#5c705edimgray
#8fa391darkseagreen
Accent
#3327a5darkslateblue
#3327a5darkslateblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#a4350asaddlebrown
#f15213orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a53327brown
#a53327brown

Contrast

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

Light mode
Text on background19.65:1AAA
Text on card19.38:1AAA
Primary button6.74:1AA
Secondary button3.21:1AA Large
Muted text3.96:1AA Large
Accent10.63:1AAA
Destructive6.78:1AA
Dark mode
Text on background20.24:1AAA
Text on card20.48:1AAA
Primary button6.74:1AA
Secondary button3.21:1AA Large
Muted text5.59:1AA
Accent10.63:1AAA
Destructive3.52:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.001 25.002);
  --foreground: oklch(0.134 0.027 31.485);
  --muted: oklch(0.898 0.018 148.362);
  --muted-foreground: oklch(0.524 0.037 147.762);
  --popover: oklch(0.992 0.001 25.002);
  --popover-foreground: oklch(0.134 0.027 31.485);
  --card: oklch(0.983 0.003 25.014);
  --card-foreground: oklch(0.12 0.023 32.019);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.491 0.152 29.807);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.633 0.187 144.201);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.385 0.191 277.021);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.488 0.154 38.119);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.491 0.152 29.807);
  --chart-1: oklch(0.491 0.152 29.807);
  --chart-2: oklch(0.633 0.187 144.201);
  --chart-3: oklch(0.385 0.191 277.021);
  --chart-4: oklch(0.668 0.198 144.175);
  --chart-5: oklch(0.493 0.158 29.99);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.009 28.394);
  --foreground: oklch(0.992 0.001 24.996);
  --muted: oklch(0.268 0.025 147.509);
  --muted-foreground: oklch(0.695 0.035 148.016);
  --popover: oklch(0.087 0.009 28.394);
  --popover-foreground: oklch(0.992 0.001 24.996);
  --card: oklch(0.109 0.011 28.394);
  --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.491 0.152 29.807);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.633 0.187 144.201);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.385 0.191 277.021);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.651 0.206 38.026);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.491 0.152 29.807);
  --chart-1: oklch(0.491 0.152 29.807);
  --chart-2: oklch(0.633 0.187 144.201);
  --chart-3: oklch(0.385 0.191 277.021);
  --chart-4: oklch(0.668 0.198 144.175);
  --chart-5: oklch(0.493 0.158 29.99);
}