Stale for shadcn/ui

Stale is a shadcn/ui theme built around a green primary color (#bac26b) with purple accents (#c26bba). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#bac26b) on a green-tinted background (#0f1004).

Color palette

TokenLightDark
Background
#ffffffwhite
#0f1004black
Foreground
#141604black
#ffffffwhite
Card
#fcfcfcsnow
#131405black
Card foreground
#101103black
#ffffffwhite
Popover
#ffffffwhite
#0f1004black
Popover foreground
#141604black
#ffffffwhite
Primary
#bac26bdarkkhaki
#bac26bdarkkhaki
Primary foreground
#000000black
#000000black
Secondary
#6bbac2mediumaquamarine
#6bbac2mediumaquamarine
Secondary foreground
#000000black
#000000black
Muted
#d3e2e3gainsboro
#1c2a2cdarkslategray
Muted foreground
#62696adimgray
#959c9ddarkgray
Accent
#c26bbamediumorchid
#c26bbamediumorchid
Accent foreground
#000000black
#000000black
Destructive
#710e09maroon
#ef463etomato
Destructive foreground
#f9b7b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bac26bdarkkhaki
#bac26bdarkkhaki

Contrast

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

Light mode
Text on background18.32:1AAA
Text on card18.62:1AAA
Primary button11.03:1AAA
Secondary button9.38:1AAA
Muted text4.19:1AA Large
Accent6.09:1AA
Destructive7.02:1AAA
Dark mode
Text on background19.14:1AAA
Text on card18.57:1AAA
Primary button11.03:1AAA
Secondary button9.38:1AAA
Muted text5.31:1AA
Accent6.09:1AA
Destructive3.72:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.192 0.034 113.996);
  --muted: oklch(0.901 0.015 204.868);
  --muted-foreground: oklch(0.516 0.009 204.863);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.192 0.034 113.996);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.173 0.03 113.617);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.789 0.113 113.677);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.74 0.079 204.84);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.653 0.149 330.896);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.354 0.133 29.068);
  --destructive-foreground: oklch(0.839 0.077 22.253);
  --ring: oklch(0.789 0.113 113.677);
  --chart-1: oklch(0.789 0.113 113.677);
  --chart-2: oklch(0.74 0.079 204.84);
  --chart-3: oklch(0.653 0.149 330.896);
  --chart-4: oklch(0.759 0.074 204.77);
  --chart-5: oklch(0.797 0.119 113.816);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.168 0.025 113.256);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.273 0.019 204.685);
  --muted-foreground: oklch(0.688 0.009 204.898);
  --popover: oklch(0.168 0.025 113.256);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.185 0.028 113.622);
  --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.789 0.113 113.677);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.74 0.079 204.84);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.653 0.149 330.896);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.639 0.207 27.646);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.789 0.113 113.677);
  --chart-1: oklch(0.789 0.113 113.677);
  --chart-2: oklch(0.74 0.079 204.84);
  --chart-3: oklch(0.653 0.149 330.896);
  --chart-4: oklch(0.759 0.074 204.77);
  --chart-5: oklch(0.797 0.119 113.816);
}