Scholarly for shadcn/ui

Scholarly is a shadcn/ui theme built around a neutral gray primary color (#a2a597) with neutral gray accents (#a597a2). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#a2a597) on a neutral background (#070802).

Color palette

TokenLightDark
Background
#ffffffwhite
#070802black
Foreground
#0a0c04black
#fdfdfcwhite
Card
#fcfcfcsnow
#0b0c03black
Card foreground
#070802black
#ffffffwhite
Popover
#ffffffwhite
#070802black
Popover foreground
#0a0c04black
#fdfdfcwhite
Primary
#a2a597darkgray
#a2a597darkgray
Primary foreground
#050505black
#050505black
Secondary
#97a2a5darkgray
#97a2a5darkgray
Secondary foreground
#050505black
#050505black
Muted
#deebedlavender
#121f21black
Muted foreground
#535d5fdimgray
#a0aaacdarkgray
Accent
#a597a2darkgray
#a597a2darkgray
Accent foreground
#050505black
#050505black
Destructive
#a83610firebrick
#ee6f44tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a2a597darkgray
#a2a597darkgray

Contrast

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

Light mode
Text on background19.67:1AAA
Text on card19.66:1AAA
Primary button8.12:1AAA
Secondary button7.82:1AAA
Muted text5.53:1AA
Accent7.34:1AAA
Destructive6.57:1AA
Dark mode
Text on background19.73:1AAA
Text on card19.64:1AAA
Primary button8.12:1AAA
Secondary button7.82:1AAA
Muted text7.13:1AAA
Accent7.34:1AAA
Destructive6.96:1AA

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.147 0.02 115.75);
  --muted: oklch(0.93 0.014 212.682);
  --muted-foreground: oklch(0.471 0.013 212.723);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.147 0.02 115.75);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.129 0.017 115.464);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.716 0.019 115.325);
  --primary-foreground: oklch(0.118 0.002 114.928);
  --secondary: oklch(0.705 0.013 212.69);
  --secondary-foreground: oklch(0.116 0.002 212.086);
  --accent: oklch(0.693 0.022 331.858);
  --accent-foreground: oklch(0.115 0.003 331.526);
  --destructive: oklch(0.496 0.157 36.841);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.716 0.019 115.325);
  --chart-1: oklch(0.716 0.019 115.325);
  --chart-2: oklch(0.705 0.013 212.69);
  --chart-3: oklch(0.693 0.022 331.858);
  --chart-4: oklch(0.73 0.012 212.685);
  --chart-5: oklch(0.723 0.028 115.529);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.13 0.019 115.541);
  --foreground: oklch(0.993 0.001 114.841);
  --muted: oklch(0.227 0.019 213.249);
  --muted-foreground: oklch(0.73 0.012 212.685);
  --popover: oklch(0.13 0.019 115.541);
  --popover-foreground: oklch(0.993 0.001 114.841);
  --card: oklch(0.15 0.023 115.987);
  --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.716 0.019 115.325);
  --primary-foreground: oklch(0.118 0.002 114.928);
  --secondary: oklch(0.705 0.013 212.69);
  --secondary-foreground: oklch(0.116 0.002 212.086);
  --accent: oklch(0.693 0.022 331.858);
  --accent-foreground: oklch(0.115 0.003 331.526);
  --destructive: oklch(0.686 0.167 38.686);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.716 0.019 115.325);
  --chart-1: oklch(0.716 0.019 115.325);
  --chart-2: oklch(0.705 0.013 212.69);
  --chart-3: oklch(0.693 0.022 331.858);
  --chart-4: oklch(0.73 0.012 212.685);
  --chart-5: oklch(0.723 0.028 115.529);
}