Scholarly for shadcn/ui

Scholarly is a shadcn/ui theme built around a vivid purple primary color (#b6079c) with vivid green accents (#07b621). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#b6079c) on a purple-tinted background (#10040e).

Color palette

TokenLightDark
Background
#ffffffwhite
#10040eblack
Foreground
#0c030bblack
#fdfcfdwhite
Card
#ffffffwhite
#10040eblack
Card foreground
#0c030bblack
#fdfcfdwhite
Popover
#ffffffwhite
#10040eblack
Popover foreground
#0c030bblack
#fdfcfdwhite
Primary
#b6079cmediumvioletred
#b6079cmediumvioletred
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#07b621forestgreen
#07b621forestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ecf3edwhitesmoke
#0c130dblack
Muted foreground
#506253dimgray
#9dafa0darkgray
Accent
#07b621forestgreen
#07b621forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#cc3300firebrick
#f53d00orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b6079cmediumvioletred
#b6079cmediumvioletred

Contrast

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

Light mode
Text on background20.31:1AAA
Text on card20.31:1AAA
Primary button6.00:1AA
Secondary button2.71:1Fail
Muted text5.80:1AA
Accent2.71:1Fail
Destructive5.19:1AA
Dark mode
Text on background19.58:1AAA
Text on card19.58:1AAA
Primary button6.00:1AA
Secondary button2.71:1Fail
Muted text8.15:1AAA
Accent2.71:1Fail
Destructive3.78:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.027 331.596);
  --muted: oklch(0.958 0.011 150.098);
  --muted-foreground: oklch(0.477 0.032 149.319);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.027 331.596);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.124 0.027 331.596);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.531 0.231 336.651);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.674 0.22 143.562);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.674 0.22 143.562);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.556 0.195 34.902);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.531 0.231 336.651);
  --chart-1: oklch(0.531 0.231 336.651);
  --chart-2: oklch(0.674 0.22 143.562);
  --chart-3: oklch(0.674 0.22 143.562);
  --chart-4: oklch(0.714 0.234 143.524);
  --chart-5: oklch(0.536 0.235 336.793);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.032 332.329);
  --foreground: oklch(0.992 0.001 330.26);
  --muted: oklch(0.176 0.016 148.959);
  --muted-foreground: oklch(0.735 0.029 149.714);
  --popover: oklch(0.138 0.032 332.329);
  --popover-foreground: oklch(0.992 0.001 330.26);
  --card: oklch(0.138 0.032 332.329);
  --card-foreground: oklch(0.992 0.001 330.26);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.531 0.231 336.651);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.674 0.22 143.562);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.674 0.22 143.562);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.636 0.226 34.552);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.531 0.231 336.651);
  --chart-1: oklch(0.531 0.231 336.651);
  --chart-2: oklch(0.674 0.22 143.562);
  --chart-3: oklch(0.674 0.22 143.562);
  --chart-4: oklch(0.714 0.234 143.524);
  --chart-5: oklch(0.536 0.235 336.793);
}