Spirit for shadcn/ui

Spirit is a shadcn/ui theme built around a muted deep red primary color (#56443e) with neutral gray accents (#e6e5e5). The light mode uses a neutral background (#fdfcfc). Dark mode keeps the muted deep red primary (#56443e) on a neutral background (#070403).

Color palette

TokenLightDark
Background
#fdfcfcsnow
#070403black
Foreground
#160804black
#fbf9f8snow
Card
#fbf9f8snow
#0b0605black
Card foreground
#110603black
#fdfcfcsnow
Popover
#fbf9f8snow
#0b0605black
Popover foreground
#110603black
#fdfcfcsnow
Primary
#56443edarkolivegreen
#56443edarkolivegreen
Primary foreground
#e7e1degainsboro
#e7e1degainsboro
Secondary
#e6e5e5gainsboro
#363130darkslategray
Secondary foreground
#4d4c4cdarkslategray
#cfcac9lightgrey
Muted
#ebdedbgainsboro
#241814black
Muted foreground
#615d5cdimgray
#a39f9edarkgray
Accent
#e6e5e5gainsboro
#363130darkslategray
Accent foreground
#4d4c4cdarkslategray
#cfcac9lightgrey
Destructive
#bf450dfirebrick
#f1753btomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#56443edarkolivegreen
#56443edarkolivegreen

Contrast

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

Light mode
Text on background19.16:1AAA
Text on card19.06:1AAA
Primary button7.11:1AAA
Secondary button6.82:1AA
Muted text4.97:1AA
Accent6.82:1AA
Destructive5.15:1AA
Dark mode
Text on background19.46:1AAA
Text on card19.68:1AAA
Primary button7.11:1AAA
Secondary button7.86:1AAA
Muted text6.60:1AA
Accent7.86:1AAA
Destructive7.36:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.001 37.736);
  --foreground: oklch(0.154 0.027 43.084);
  --muted: oklch(0.911 0.015 37.669);
  --muted-foreground: oklch(0.481 0.006 37.685);
  --popover: oklch(0.984 0.003 37.729);
  --popover-foreground: oklch(0.141 0.024 45.112);
  --card: oklch(0.984 0.003 37.729);
  --card-foreground: oklch(0.141 0.024 45.112);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.403 0.027 37.592);
  --primary-foreground: oklch(0.913 0.008 37.7);
  --secondary: oklch(0.923 0 37.74);
  --secondary-foreground: oklch(0.418 0.002 37.722);
  --accent: oklch(0.923 0 37.74);
  --accent-foreground: oklch(0.418 0.002 37.722);
  --destructive: oklch(0.553 0.167 40.242);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.403 0.027 37.592);
  --chart-1: oklch(0.403 0.027 37.592);
  --chart-2: oklch(0.923 0 37.74);
  --chart-3: oklch(0.923 0 37.74);
  --chart-4: oklch(0.946 0 37.741);
  --chart-5: oklch(0.402 0.032 37.597);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.113 0.009 42.473);
  --foreground: oklch(0.984 0.003 37.728);
  --muted: oklch(0.222 0.022 37.618);
  --muted-foreground: oklch(0.706 0.005 37.705);
  --popover: oklch(0.129 0.011 42.43);
  --popover-foreground: oklch(0.992 0.001 37.736);
  --card: oklch(0.129 0.011 42.43);
  --card-foreground: oklch(0.992 0.001 37.736);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.403 0.027 37.592);
  --primary-foreground: oklch(0.913 0.008 37.7);
  --secondary: oklch(0.319 0.007 37.65);
  --secondary-foreground: oklch(0.843 0.006 37.71);
  --accent: oklch(0.319 0.007 37.65);
  --accent-foreground: oklch(0.843 0.006 37.71);
  --destructive: oklch(0.699 0.169 43.504);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.403 0.027 37.592);
  --chart-1: oklch(0.403 0.027 37.592);
  --chart-2: oklch(0.319 0.007 37.65);
  --chart-3: oklch(0.319 0.007 37.65);
  --chart-4: oklch(0.349 0.008 37.648);
  --chart-5: oklch(0.402 0.032 37.597);
}