Alder for shadcn/ui

Alder is a shadcn/ui theme built around a yellow primary color (#dfc777) with muted light yellow accents (#dad7cd). The light mode uses a neutral background (#ffffff). Dark mode keeps the yellow primary (#dfc777) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040301black
#fcfbf8snow
Card
#ffffffwhite
#000000black
Card foreground
#040301black
#fcfbf8snow
Popover
#ffffffwhite
#000000black
Popover foreground
#040301black
#fcfbf8snow
Primary
#dfc777burlywood
#dfc777burlywood
Primary foreground
#1d1807black
#1d1807black
Secondary
#dad7cdlightgrey
#2e2b24darkslategray
Secondary foreground
#433f32darkslategray
#c9c6basilver
Muted
#edebe3linen
#1c1a12black
Muted foreground
#605e57dimgray
#a8a69fdarkgray
Accent
#dad7cdlightgrey
#2e2b24darkslategray
Accent foreground
#433f32darkslategray
#c9c6basilver
Destructive
#640a07maroon
#f0342dcrimson
Destructive foreground
#f9a7a4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#dfc777burlywood
#dfc777burlywood

Contrast

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

Light mode
Text on background20.61:1AAA
Text on card20.61:1AAA
Primary button10.57:1AAA
Secondary button7.31:1AAA
Muted text5.42:1AA
Accent7.31:1AAA
Destructive6.97:1AA
Dark mode
Text on background20.29:1AAA
Text on card20.29:1AAA
Primary button10.57:1AAA
Secondary button8.22:1AAA
Muted text7.16:1AAA
Accent8.22:1AAA
Destructive4.00:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.1 0.012 97.415);
  --muted: oklch(0.939 0.011 92.766);
  --muted-foreground: oklch(0.483 0.011 92.873);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.1 0.012 97.415);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.1 0.012 97.415);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.832 0.104 93.006);
  --primary-foreground: oklch(0.209 0.031 93.024);
  --secondary: oklch(0.879 0.014 92.807);
  --secondary-foreground: oklch(0.369 0.023 93.114);
  --accent: oklch(0.879 0.014 92.807);
  --accent-foreground: oklch(0.369 0.023 93.114);
  --destructive: oklch(0.324 0.122 28.757);
  --destructive-foreground: oklch(0.808 0.097 21.605);
  --ring: oklch(0.832 0.104 93.006);
  --chart-1: oklch(0.832 0.104 93.006);
  --chart-2: oklch(0.879 0.014 92.807);
  --chart-3: oklch(0.879 0.014 92.807);
  --chart-4: oklch(0.901 0.011 92.778);
  --chart-5: oklch(0.837 0.108 92.959);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.988 0.004 92.699);
  --muted: oklch(0.216 0.015 93.14);
  --muted-foreground: oklch(0.724 0.01 92.793);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.988 0.004 92.699);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.988 0.004 92.699);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.832 0.104 93.006);
  --primary-foreground: oklch(0.209 0.031 93.024);
  --secondary: oklch(0.291 0.014 93.039);
  --secondary-foreground: oklch(0.825 0.016 92.837);
  --accent: oklch(0.291 0.014 93.039);
  --accent-foreground: oklch(0.825 0.016 92.837);
  --destructive: oklch(0.623 0.224 28.034);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.832 0.104 93.006);
  --chart-1: oklch(0.832 0.104 93.006);
  --chart-2: oklch(0.291 0.014 93.039);
  --chart-3: oklch(0.291 0.014 93.039);
  --chart-4: oklch(0.323 0.016 93.049);
  --chart-5: oklch(0.837 0.108 92.959);
}