Graduation for shadcn/ui

Graduation is a shadcn/ui theme built around an indigo primary color (#3c3569) with muted light indigo accents (#d0ced9). The light mode uses a neutral background (#ffffff). Dark mode keeps the indigo primary (#3c3569) on an indigo-tinted background (#07060e).

Color palette

TokenLightDark
Background
#ffffffwhite
#07060eblack
Foreground
#030208black
#fcfcfdwhite
Card
#fcfcfcsnow
#090812black
Card foreground
#010104black
#ffffffwhite
Popover
#ffffffwhite
#07060eblack
Popover foreground
#030208black
#fcfcfdwhite
Primary
#3c3569darkslateblue
#3c3569darkslateblue
Primary foreground
#e2e0f0lavender
#e2e0f0lavender
Secondary
#d0ced9lightgrey
#2d2c30darkslategray
Secondary foreground
#353342darkslategray
#c5c5c9silver
Muted
#f0f0f5whitesmoke
#0b0a0fblack
Muted foreground
#535256darkslategray
#aaa9addarkgray
Accent
#d0ced9lightgrey
#2d2c30darkslategray
Accent foreground
#353342darkslategray
#c5c5c9silver
Destructive
#b83a00firebrick
#ff6219orangered
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#3c3569darkslateblue
#3c3569darkslateblue

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.39:1AAA
Primary button8.48:1AAA
Secondary button7.92:1AAA
Muted text6.82:1AA
Accent7.92:1AAA
Destructive5.77:1AA
Dark mode
Text on background19.63:1AAA
Text on card19.91:1AAA
Primary button8.48:1AAA
Secondary button8.06:1AAA
Muted text8.43:1AAA
Accent8.06:1AAA
Destructive7.02:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.096 0.022 290.344);
  --muted: oklch(0.956 0.006 292.416);
  --muted-foreground: oklch(0.442 0.005 292.31);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.096 0.022 290.344);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.076 0.017 290.344);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.363 0.088 287.307);
  --primary-foreground: oklch(0.914 0.021 292.118);
  --secondary: oklch(0.856 0.016 292.201);
  --secondary-foreground: oklch(0.33 0.027 290.964);
  --accent: oklch(0.856 0.016 292.201);
  --accent-foreground: oklch(0.33 0.027 290.964);
  --destructive: oklch(0.527 0.17 38.613);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.363 0.088 287.307);
  --chart-1: oklch(0.363 0.088 287.307);
  --chart-2: oklch(0.856 0.016 292.201);
  --chart-3: oklch(0.856 0.016 292.201);
  --chart-4: oklch(0.882 0.013 292.272);
  --chart-5: oklch(0.358 0.095 286.648);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.131 0.018 290.833);
  --foreground: oklch(0.991 0.002 292.508);
  --muted: oklch(0.15 0.01 291.204);
  --muted-foreground: oklch(0.737 0.005 292.421);
  --popover: oklch(0.131 0.018 290.833);
  --popover-foreground: oklch(0.991 0.002 292.508);
  --card: oklch(0.141 0.021 290.006);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.363 0.088 287.307);
  --primary-foreground: oklch(0.914 0.021 292.118);
  --secondary: oklch(0.295 0.007 292.12);
  --secondary-foreground: oklch(0.824 0.006 292.401);
  --accent: oklch(0.295 0.007 292.12);
  --accent-foreground: oklch(0.824 0.006 292.401);
  --destructive: oklch(0.692 0.205 40.62);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.363 0.088 287.307);
  --chart-1: oklch(0.363 0.088 287.307);
  --chart-2: oklch(0.295 0.007 292.12);
  --chart-3: oklch(0.295 0.007 292.12);
  --chart-4: oklch(0.325 0.008 292.105);
  --chart-5: oklch(0.358 0.095 286.648);
}