Academic for shadcn/ui

Academic is a shadcn/ui theme built around a pink primary color (#de9cbe) with blue accents (#9cbede). The light mode uses a neutral background (#fefbfc). Dark mode keeps the pink primary (#de9cbe) on a pink-tinted background (#0e060a).

Color palette

TokenLightDark
Background
#fefbfcsnow
#0e060ablack
Foreground
#000000black
#fdfcfcsnow
Card
#fdf7fasnow
#12080dblack
Card foreground
#000000black
#ffffffwhite
Popover
#fdf7fasnow
#12080dblack
Popover foreground
#000000black
#ffffffwhite
Primary
#de9cbeplum
#de9cbeplum
Primary foreground
#361224black
#361224black
Secondary
#bede9csilver
#bede9csilver
Secondary foreground
#243612darkgreen
#243612darkgreen
Muted
#e3edd9gainsboro
#1c2612black
Muted foreground
#5e615cdimgray
#a1a39edarkgray
Accent
#9cbedelightsteelblue
#9cbedelightsteelblue
Accent foreground
#122436darkslategray
#122436darkslategray
Destructive
#722a04saddlebrown
#f25a07orangered
Destructive foreground
#fcc7abnavajowhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#de9cbeplum
#de9cbeplum

Contrast

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

Light mode
Text on background20.42:1AAA
Text on card19.87:1AAA
Primary button7.54:1AAA
Secondary button8.74:1AAA
Muted text5.19:1AA
Accent8.11:1AAA
Destructive6.78:1AA
Dark mode
Text on background19.51:1AAA
Text on card19.71:1AAA
Primary button7.54:1AAA
Secondary button8.74:1AAA
Muted text6.17:1AA
Accent8.11:1AAA
Destructive3.36:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 344.374);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.933 0.028 128.145);
  --muted-foreground: oklch(0.489 0.009 128.018);
  --popover: oklch(0.982 0.007 344.463);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.007 344.463);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.765 0.09 347.104);
  --primary-foreground: oklch(0.245 0.063 350.522);
  --secondary: oklch(0.861 0.094 129.174);
  --secondary-foreground: oklch(0.306 0.062 130.801);
  --accent: oklch(0.787 0.059 246.832);
  --accent-foreground: oklch(0.255 0.041 248.189);
  --destructive: oklch(0.385 0.111 43.085);
  --destructive-foreground: oklch(0.871 0.072 49.691);
  --ring: oklch(0.765 0.09 347.104);
  --chart-1: oklch(0.765 0.09 347.104);
  --chart-2: oklch(0.861 0.094 129.174);
  --chart-3: oklch(0.787 0.059 246.832);
  --chart-4: oklch(0.876 0.084 128.975);
  --chart-5: oklch(0.764 0.096 347.274);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.017 345.715);
  --foreground: oklch(0.991 0.002 344.338);
  --muted: oklch(0.253 0.037 129.75);
  --muted-foreground: oklch(0.713 0.009 127.932);
  --popover: oklch(0.151 0.02 347.081);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.151 0.02 347.081);
  --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.765 0.09 347.104);
  --primary-foreground: oklch(0.245 0.063 350.522);
  --secondary: oklch(0.861 0.094 129.174);
  --secondary-foreground: oklch(0.306 0.062 130.801);
  --accent: oklch(0.787 0.059 246.832);
  --accent-foreground: oklch(0.255 0.041 248.189);
  --destructive: oklch(0.661 0.201 40.923);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.765 0.09 347.104);
  --chart-1: oklch(0.765 0.09 347.104);
  --chart-2: oklch(0.861 0.094 129.174);
  --chart-3: oklch(0.787 0.059 246.832);
  --chart-4: oklch(0.876 0.084 128.975);
  --chart-5: oklch(0.764 0.096 347.274);
}