Spirit for shadcn/ui

Spirit is a shadcn/ui theme built around a vivid yellow primary color (#f4d366) with vivid purple accents (#d366f4). The light mode uses a neutral background (#fefdfb). Dark mode keeps the vivid yellow primary (#f4d366) on a neutral background (#030302).

Color palette

TokenLightDark
Background
#fefdfbsnow
#030302black
Foreground
#161204black
#faf9f4whitesmoke
Card
#fcfbf8snow
#070603black
Card foreground
#110e03black
#fcfbf8snow
Popover
#fefdfbsnow
#030302black
Popover foreground
#161204black
#faf9f4whitesmoke
Primary
#f4d366khaki
#f4d366khaki
Primary foreground
#261e03black
#261e03black
Secondary
#66f4d3aquamarine
#66f4d3aquamarine
Secondary foreground
#03261eblack
#03261eblack
Muted
#dee7e5gainsboro
#18211eblack
Muted foreground
#485653darkslategray
#a9b7b4darkgray
Accent
#d366f4orchid
#d366f4orchid
Accent foreground
#1e0326black
#1e0326black
Destructive
#ad0900darkred
#ff3d33tomato
Destructive foreground
#ffe2e0mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f4d366khaki
#f4d366khaki

Contrast

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

Light mode
Text on background18.40:1AAA
Text on card18.67:1AAA
Primary button11.34:1AAA
Secondary button11.92:1AAA
Muted text6.12:1AA
Accent6.39:1AA
Destructive6.09:1AA
Dark mode
Text on background19.56:1AAA
Text on card19.57:1AAA
Primary button11.34:1AAA
Secondary button11.92:1AAA
Muted text7.97:1AAA
Accent6.39:1AA
Destructive3.51:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 92.681);
  --foreground: oklch(0.181 0.028 94.397);
  --muted: oklch(0.922 0.01 180.653);
  --muted-foreground: oklch(0.44 0.019 179.719);
  --popover: oklch(0.994 0.002 92.681);
  --popover-foreground: oklch(0.181 0.028 94.397);
  --card: oklch(0.988 0.005 92.706);
  --card-foreground: oklch(0.164 0.025 95.562);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.875 0.133 92.553);
  --primary-foreground: oklch(0.238 0.045 92.473);
  --secondary: oklch(0.882 0.132 175.134);
  --secondary-foreground: oklch(0.241 0.043 173.701);
  --accent: oklch(0.697 0.22 317.651);
  --accent-foreground: oklch(0.178 0.076 317.556);
  --destructive: oklch(0.473 0.19 29.864);
  --destructive-foreground: oklch(0.936 0.032 21.349);
  --ring: oklch(0.875 0.133 92.553);
  --chart-1: oklch(0.875 0.133 92.553);
  --chart-2: oklch(0.882 0.132 175.134);
  --chart-3: oklch(0.697 0.22 317.651);
  --chart-4: oklch(0.89 0.123 175.854);
  --chart-5: oklch(0.879 0.136 92.471);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.008 95.929);
  --foreground: oklch(0.982 0.006 92.717);
  --muted: oklch(0.236 0.014 179.241);
  --muted-foreground: oklch(0.768 0.016 180.346);
  --popover: oklch(0.097 0.008 95.929);
  --popover-foreground: oklch(0.982 0.006 92.717);
  --card: oklch(0.123 0.01 95.929);
  --card-foreground: oklch(0.988 0.004 92.697);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.875 0.133 92.553);
  --primary-foreground: oklch(0.238 0.045 92.473);
  --secondary: oklch(0.882 0.132 175.134);
  --secondary-foreground: oklch(0.241 0.043 173.701);
  --accent: oklch(0.697 0.22 317.651);
  --accent-foreground: oklch(0.178 0.076 317.556);
  --destructive: oklch(0.656 0.23 28.425);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.875 0.133 92.553);
  --chart-1: oklch(0.875 0.133 92.553);
  --chart-2: oklch(0.882 0.132 175.134);
  --chart-3: oklch(0.697 0.22 317.651);
  --chart-4: oklch(0.89 0.123 175.854);
  --chart-5: oklch(0.879 0.136 92.471);
}