Stale for shadcn/ui

Stale is a shadcn/ui theme built around a deep purple primary color (#301335) with deep green accents (#173513). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep purple primary (#301335) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040104black
#fdfcfdwhite
Card
#ffffffwhite
#000000black
Card foreground
#040104black
#fdfcfdwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#040104black
#fdfcfdwhite
Primary
#301335midnightblue
#301335midnightblue
Primary foreground
#d49dddplum
#d49dddplum
Secondary
#173513darkgreen
#173513darkgreen
Secondary foreground
#60c251mediumseagreen
#60c251mediumseagreen
Muted
#d7e7d5gainsboro
#1b2a18black
Muted foreground
#586156dimgray
#9fa99edarkgray
Accent
#173513darkgreen
#173513darkgreen
Accent foreground
#60c251mediumseagreen
#60c251mediumseagreen
Destructive
#7f1605maroon
#f0290aorangered
Destructive foreground
#fcc3balightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#301335midnightblue
#301335midnightblue

Contrast

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

Light mode
Text on background20.76:1AAA
Text on card20.76:1AAA
Primary button7.62:1AAA
Secondary button6.01:1AA
Muted text4.99:1AA
Accent6.01:1AA
Destructive6.75:1AA
Dark mode
Text on background20.51:1AAA
Text on card20.51:1AAA
Primary button7.62:1AAA
Secondary button6.01:1AA
Muted text6.21:1AA
Accent6.01:1AA
Destructive4.18: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.084 0.021 323.529);
  --muted: oklch(0.911 0.029 141.502);
  --muted-foreground: oklch(0.482 0.021 141.469);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.084 0.021 323.529);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.084 0.021 323.529);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.247 0.072 322.143);
  --primary-foreground: oklch(0.769 0.107 321.946);
  --secondary: oklch(0.296 0.068 141.082);
  --secondary-foreground: oklch(0.73 0.177 141.085);
  --accent: oklch(0.296 0.068 141.082);
  --accent-foreground: oklch(0.73 0.177 141.085);
  --destructive: oklch(0.388 0.142 31.628);
  --destructive-foreground: oklch(0.866 0.067 28.525);
  --ring: oklch(0.247 0.072 322.143);
  --chart-1: oklch(0.247 0.072 322.143);
  --chart-2: oklch(0.296 0.068 141.082);
  --chart-3: oklch(0.296 0.068 141.082);
  --chart-4: oklch(0.334 0.08 141.083);
  --chart-5: oklch(0.247 0.076 322.141);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.003 321.6);
  --muted: oklch(0.266 0.039 141.202);
  --muted-foreground: oklch(0.723 0.019 141.518);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.003 321.6);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.991 0.003 321.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.247 0.072 322.143);
  --primary-foreground: oklch(0.769 0.107 321.946);
  --secondary: oklch(0.296 0.068 141.082);
  --secondary-foreground: oklch(0.73 0.177 141.085);
  --accent: oklch(0.296 0.068 141.082);
  --accent-foreground: oklch(0.73 0.177 141.085);
  --destructive: oklch(0.613 0.233 31.156);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.247 0.072 322.143);
  --chart-1: oklch(0.247 0.072 322.143);
  --chart-2: oklch(0.296 0.068 141.082);
  --chart-3: oklch(0.296 0.068 141.082);
  --chart-4: oklch(0.334 0.08 141.083);
  --chart-5: oklch(0.247 0.076 322.141);
}