Stale for shadcn/ui

Stale is a shadcn/ui theme built around a muted deep blue primary color (#212a31) with muted deep orange accents (#312821). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep blue primary (#212a31) on a blue-tinted background (#05080a).

Color palette

TokenLightDark
Background
#ffffffwhite
#05080ablack
Foreground
#040e16black
#fcfdfdwhite
Card
#ffffffwhite
#05080ablack
Card foreground
#040e16black
#fcfdfdwhite
Popover
#ffffffwhite
#05080ablack
Popover foreground
#040e16black
#fcfdfdwhite
Primary
#212a31darkslategray
#212a31darkslategray
Primary foreground
#b6c3cdsilver
#b6c3cdsilver
Secondary
#312821darkslategray
#312821darkslategray
Secondary foreground
#cdc1b6silver
#cdc1b6silver
Muted
#eadacdgainsboro
#322215black
Muted foreground
#615e5cdimgray
#a3a09edarkgray
Accent
#312821darkslategray
#312821darkslategray
Accent foreground
#cdc1b6silver
#cdc1b6silver
Destructive
#b72e01firebrick
#e43a01orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#212a31darkslategray
#212a31darkslategray

Contrast

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

Light mode
Text on background19.45:1AAA
Text on card19.45:1AAA
Primary button8.14:1AAA
Secondary button8.18:1AAA
Muted text4.71:1AA
Accent8.18:1AAA
Destructive6.17:1AA
Dark mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button8.14:1AAA
Secondary button8.18:1AAA
Muted text5.86:1AA
Accent8.18:1AAA
Destructive4.27: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.156 0.025 240.806);
  --muted: oklch(0.897 0.025 61.825);
  --muted-foreground: oklch(0.484 0.006 62.038);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.156 0.025 240.806);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.156 0.025 240.806);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.278 0.018 243.069);
  --primary-foreground: oklch(0.81 0.02 242.528);
  --secondary: oklch(0.284 0.018 61.298);
  --secondary-foreground: oklch(0.817 0.02 61.857);
  --accent: oklch(0.284 0.018 61.298);
  --accent-foreground: oklch(0.817 0.02 61.857);
  --destructive: oklch(0.514 0.179 35.216);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.278 0.018 243.069);
  --chart-1: oklch(0.278 0.018 243.069);
  --chart-2: oklch(0.284 0.018 61.298);
  --chart-3: oklch(0.284 0.018 61.298);
  --chart-4: oklch(0.316 0.021 61.256);
  --chart-5: oklch(0.278 0.02 243.222);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.131 0.008 237.682);
  --foreground: oklch(0.992 0.001 242.207);
  --muted: oklch(0.269 0.033 60.058);
  --muted-foreground: oklch(0.709 0.005 62.097);
  --popover: oklch(0.131 0.008 237.682);
  --popover-foreground: oklch(0.992 0.001 242.207);
  --card: oklch(0.131 0.008 237.682);
  --card-foreground: oklch(0.992 0.001 242.207);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.278 0.018 243.069);
  --primary-foreground: oklch(0.81 0.02 242.528);
  --secondary: oklch(0.284 0.018 61.298);
  --secondary-foreground: oklch(0.817 0.02 61.857);
  --accent: oklch(0.284 0.018 61.298);
  --accent-foreground: oklch(0.817 0.02 61.857);
  --destructive: oklch(0.605 0.213 34.761);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.278 0.018 243.069);
  --chart-1: oklch(0.278 0.018 243.069);
  --chart-2: oklch(0.284 0.018 61.298);
  --chart-3: oklch(0.284 0.018 61.298);
  --chart-4: oklch(0.316 0.021 61.256);
  --chart-5: oklch(0.278 0.02 243.222);
}