Ayu Dark for shadcn/ui

Ayu Dark is a shadcn/ui theme built around a yellow primary color (#e6b451) with muted deep blue accents (#263045). The light mode uses a blue-tinted background (#0b0e14). Dark mode keeps the yellow primary (#e6b451) on a blue-tinted background (#0b0e14).

Color palette

TokenLightDark
Background
#0b0e14black
#0b0e14black
Foreground
#bfbdb5silver
#bfbdb5silver
Card
#07090dblack
#07090dblack
Card foreground
#cbc9c3silver
#cbc9c3silver
Popover
#05070ablack
#05070ablack
Popover foreground
#d7d5d1lightgrey
#d7d5d1lightgrey
Primary
#e6b451sandybrown
#e6b451sandybrown
Primary foreground
#040301black
#040301black
Secondary
#53462ddarkolivegreen
#53462ddarkolivegreen
Secondary foreground
#e4ddcdgainsboro
#e4ddcdgainsboro
Muted
#22252bdarkslategray
#22252bdarkslategray
Muted foreground
#9ba2b0darkgray
#9ba2b0darkgray
Accent
#263045darkslategray
#263045darkslategray
Accent foreground
#c0caddlightsteelblue
#c0caddlightsteelblue
Destructive
#f5433dtomato
#f5433dtomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#171a21black
#171a21black
Input
#1d212ablack
#1d212ablack
Ring
#e6b451sandybrown
#e6b451sandybrown

Contrast

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

Light mode
Text on background10.27:1AAA
Text on card12.01:1AAA
Primary button10.84:1AAA
Secondary button6.79:1AA
Muted text6.00:1AA
Accent7.97:1AAA
Destructive3.64:1AA Large
Dark mode
Text on background10.27:1AAA
Text on card12.01:1AAA
Primary button10.84:1AAA
Secondary button6.79:1AA
Muted text6.00:1AA
Accent7.97:1AAA
Destructive3.64:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.163 0.013 264.095);
  --foreground: oklch(0.798 0.011 94.007);
  --muted: oklch(0.263 0.012 264.338);
  --muted-foreground: oklch(0.712 0.022 264.424);
  --popover: oklch(0.127 0.008 260.757);
  --popover-foreground: oklch(0.874 0.007 93.946);
  --card: oklch(0.14 0.009 262.041);
  --card-foreground: oklch(0.836 0.009 93.975);
  --border: oklch(0.219 0.015 264.197);
  --input: oklch(0.249 0.018 264.158);
  --primary: oklch(0.798 0.129 82.218);
  --primary-foreground: oklch(0.1 0.015 92.325);
  --secondary: oklch(0.401 0.043 84.052);
  --secondary-foreground: oklch(0.898 0.022 84.593);
  --accent: oklch(0.311 0.04 263.725);
  --accent-foreground: oklch(0.837 0.028 264.412);
  --destructive: oklch(0.645 0.215 27.143);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.798 0.129 82.218);
  --chart-1: oklch(0.798 0.129 82.218);
  --chart-2: oklch(0.401 0.043 84.052);
  --chart-3: oklch(0.311 0.04 263.725);
  --chart-4: oklch(0.433 0.047 84.022);
  --chart-5: oklch(0.803 0.133 81.985);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.163 0.013 264.095);
  --foreground: oklch(0.798 0.011 94.007);
  --muted: oklch(0.263 0.012 264.338);
  --muted-foreground: oklch(0.712 0.022 264.424);
  --popover: oklch(0.127 0.008 260.757);
  --popover-foreground: oklch(0.874 0.007 93.946);
  --card: oklch(0.14 0.009 262.041);
  --card-foreground: oklch(0.836 0.009 93.975);
  --border: oklch(0.219 0.015 264.197);
  --input: oklch(0.249 0.018 264.158);
  --primary: oklch(0.798 0.129 82.218);
  --primary-foreground: oklch(0.1 0.015 92.325);
  --secondary: oklch(0.401 0.043 84.052);
  --secondary-foreground: oklch(0.898 0.022 84.593);
  --accent: oklch(0.311 0.04 263.725);
  --accent-foreground: oklch(0.837 0.028 264.412);
  --destructive: oklch(0.645 0.215 27.143);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.798 0.129 82.218);
  --chart-1: oklch(0.798 0.129 82.218);
  --chart-2: oklch(0.401 0.043 84.052);
  --chart-3: oklch(0.311 0.04 263.725);
  --chart-4: oklch(0.433 0.047 84.022);
  --chart-5: oklch(0.803 0.133 81.985);
}