Graduate for shadcn/ui

Graduate is a shadcn/ui theme built around a vivid indigo primary color (#0c0c97) with vivid yellow accents (#97970c). The light mode uses a neutral background (#f8f8fc). Dark mode keeps the vivid indigo primary (#0c0c97) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#f8f8fcghostwhite
#020203black
Foreground
#050515black
#f8f8fcghostwhite
Card
#f8f8fcghostwhite
#020203black
Card foreground
#050515black
#f8f8fcghostwhite
Popover
#f8f8fcghostwhite
#020203black
Popover foreground
#050515black
#f8f8fcghostwhite
Primary
#0c0c97darkblue
#0c0c97darkblue
Primary foreground
#d9d9fclavender
#d9d9fclavender
Secondary
#97970colive
#97970colive
Secondary foreground
#000000black
#000000black
Muted
#f5f5efwhitesmoke
#10100ablack
Muted foreground
#59594adarkolivegreen
#b5b5a6darkgray
Accent
#97970colive
#97970colive
Accent foreground
#000000black
#000000black
Destructive
#6f2401maroon
#fd631corangered
Destructive foreground
#fec1a4navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c0c97darkblue
#0c0c97darkblue

Contrast

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

Light mode
Text on background19.05:1AAA
Text on card19.05:1AAA
Primary button10.07:1AAA
Secondary button6.74:1AA
Muted text6.50:1AA
Accent6.74:1AA
Destructive6.93:1AA
Dark mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button10.07:1AAA
Secondary button6.74:1AA
Muted text9.22:1AAA
Accent6.74:1AA
Destructive6.96:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.005 286.3);
  --foreground: oklch(0.126 0.037 279.734);
  --muted: oklch(0.969 0.007 106.537);
  --muted-foreground: oklch(0.459 0.023 107.272);
  --popover: oklch(0.98 0.005 286.3);
  --popover-foreground: oklch(0.126 0.037 279.734);
  --card: oklch(0.98 0.005 286.3);
  --card-foreground: oklch(0.126 0.037 279.734);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.318 0.203 266.594);
  --primary-foreground: oklch(0.897 0.047 285.407);
  --secondary: oklch(0.655 0.14 109.715);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.655 0.14 109.715);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.372 0.114 40.608);
  --destructive-foreground: oklch(0.858 0.081 45.989);
  --ring: oklch(0.318 0.203 266.594);
  --chart-1: oklch(0.318 0.203 266.594);
  --chart-2: oklch(0.655 0.14 109.715);
  --chart-3: oklch(0.655 0.14 109.715);
  --chart-4: oklch(0.699 0.15 109.72);
  --chart-5: oklch(0.319 0.208 266.046);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.009 284.403);
  --foreground: oklch(0.981 0.005 286.315);
  --muted: oklch(0.169 0.011 107.54);
  --muted-foreground: oklch(0.768 0.02 106.871);
  --popover: oklch(0.084 0.009 284.403);
  --popover-foreground: oklch(0.981 0.005 286.315);
  --card: oklch(0.084 0.009 284.403);
  --card-foreground: oklch(0.981 0.005 286.315);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.318 0.203 266.594);
  --primary-foreground: oklch(0.897 0.047 285.407);
  --secondary: oklch(0.655 0.14 109.715);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.655 0.14 109.715);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.689 0.202 40.882);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.318 0.203 266.594);
  --chart-1: oklch(0.318 0.203 266.594);
  --chart-2: oklch(0.655 0.14 109.715);
  --chart-3: oklch(0.655 0.14 109.715);
  --chart-4: oklch(0.699 0.15 109.72);
  --chart-5: oklch(0.319 0.208 266.046);
}