Downgrade for shadcn/ui

Downgrade is a shadcn/ui theme built around a muted orange primary color (#846f52) with muted violet accents (#6f5284). The light mode uses a neutral background (#fcfaf8). Dark mode keeps the muted orange primary (#846f52) on a neutral background (#070504).

Color palette

TokenLightDark
Background
#fcfaf8snow
#070504black
Foreground
#090601black
#fdfdfbsnow
Card
#fcfaf8snow
#070504black
Card foreground
#090601black
#fdfdfbsnow
Popover
#fcfaf8snow
#070504black
Popover foreground
#090601black
#fdfdfbsnow
Primary
#846f52dimgray
#846f52dimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#52846fdimgray
#52846fdimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d8e8e2gainsboro
#172720black
Muted foreground
#5d5f5fdimgray
#a0a2a1darkgray
Accent
#6f5284dimgray
#6f5284dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#af1308firebrick
#f53b2eorangered
Destructive foreground
#feedeclinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#846f52dimgray
#846f52dimgray

Contrast

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

Light mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button4.79:1AA
Secondary button4.30:1AA Large
Muted text5.08:1AA
Accent6.49:1AA
Destructive6.32:1AA
Dark mode
Text on background19.95:1AAA
Text on card19.95:1AAA
Primary button4.79:1AA
Secondary button4.30:1AA Large
Muted text6.09:1AA
Accent6.49:1AA
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.003 76.636);
  --foreground: oklch(0.123 0.02 86.572);
  --muted: oklch(0.918 0.019 169.07);
  --muted-foreground: oklch(0.485 0.003 169.514);
  --popover: oklch(0.986 0.003 76.636);
  --popover-foreground: oklch(0.123 0.02 86.572);
  --card: oklch(0.986 0.003 76.636);
  --card-foreground: oklch(0.123 0.02 86.572);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.554 0.049 75.772);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.571 0.063 166.028);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.49 0.084 310.308);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.481 0.188 29.761);
  --destructive-foreground: oklch(0.959 0.019 22.444);
  --ring: oklch(0.554 0.049 75.772);
  --chart-1: oklch(0.554 0.049 75.772);
  --chart-2: oklch(0.571 0.063 166.028);
  --chart-3: oklch(0.49 0.084 310.308);
  --chart-4: oklch(0.6 0.066 165.999);
  --chart-5: oklch(0.558 0.055 75.572);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.007 80.54);
  --foreground: oklch(0.993 0.002 76.644);
  --muted: oklch(0.254 0.025 166.475);
  --muted-foreground: oklch(0.709 0.002 169.573);
  --popover: oklch(0.119 0.007 80.54);
  --popover-foreground: oklch(0.993 0.002 76.644);
  --card: oklch(0.119 0.007 80.54);
  --card-foreground: oklch(0.993 0.002 76.644);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.554 0.049 75.772);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.571 0.063 166.028);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.49 0.084 310.308);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.637 0.224 29.102);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.554 0.049 75.772);
  --chart-1: oklch(0.554 0.049 75.772);
  --chart-2: oklch(0.571 0.063 166.028);
  --chart-3: oklch(0.49 0.084 310.308);
  --chart-4: oklch(0.6 0.066 165.999);
  --chart-5: oklch(0.558 0.055 75.572);
}