Scholarly for shadcn/ui

Scholarly is a shadcn/ui theme built around a neutral gray primary color (#87978b) with neutral gray accents (#978792). The light mode uses a neutral background (#f7fdf9). Dark mode keeps the neutral gray primary (#87978b) on a neutral background (#030704).

Color palette

TokenLightDark
Background
#f7fdf9mintcream
#030704black
Foreground
#000000black
#f8fcf9mintcream
Card
#f7fdf9mintcream
#030704black
Card foreground
#000000black
#f8fcf9mintcream
Popover
#f7fdf9mintcream
#030704black
Popover foreground
#000000black
#f8fcf9mintcream
Primary
#87978blightslategray
#87978blightslategray
Primary foreground
#000000black
#000000black
Secondary
#978792gray
#978792gray
Secondary foreground
#000000black
#000000black
Muted
#f6eff4whitesmoke
#10090eblack
Muted foreground
#463943darkslategray
#c6b9c2silver
Accent
#978792gray
#978792gray
Accent foreground
#000000black
#000000black
Destructive
#6a1b01maroon
#fd541corangered
Destructive foreground
#feb79flightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#87978blightslategray
#87978blightslategray

Contrast

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

Light mode
Text on background20.32:1AAA
Text on card20.32:1AAA
Primary button6.80:1AA
Secondary button6.18:1AA
Muted text9.61:1AAA
Accent6.18:1AA
Destructive7.04:1AAA
Dark mode
Text on background19.56:1AAA
Text on card19.56:1AAA
Primary button6.80:1AA
Secondary button6.18:1AA
Muted text10.40:1AAA
Accent6.18:1AA
Destructive6.45:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.008 154.387);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.958 0.01 334.715);
  --muted-foreground: oklch(0.363 0.023 335.619);
  --popover: oklch(0.988 0.008 154.387);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.008 154.387);
  --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.659 0.025 153.85);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.641 0.025 335.197);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.641 0.025 335.197);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.351 0.116 36.931);
  --destructive-foreground: oklch(0.84 0.09 39.212);
  --ring: oklch(0.659 0.025 153.85);
  --chart-1: oklch(0.659 0.025 153.85);
  --chart-2: oklch(0.641 0.025 335.197);
  --chart-3: oklch(0.641 0.025 335.197);
  --chart-4: oklch(0.667 0.023 335.123);
  --chart-5: oklch(0.664 0.035 153.558);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.121 0.013 154.117);
  --foreground: oklch(0.987 0.005 154.439);
  --muted: oklch(0.153 0.016 336.261);
  --muted-foreground: oklch(0.799 0.019 334.944);
  --popover: oklch(0.121 0.013 154.117);
  --popover-foreground: oklch(0.987 0.005 154.439);
  --card: oklch(0.121 0.013 154.117);
  --card-foreground: oklch(0.987 0.005 154.439);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.659 0.025 153.85);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.641 0.025 335.197);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.641 0.025 335.197);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.672 0.214 36.732);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.659 0.025 153.85);
  --chart-1: oklch(0.659 0.025 153.85);
  --chart-2: oklch(0.641 0.025 335.197);
  --chart-3: oklch(0.641 0.025 335.197);
  --chart-4: oklch(0.667 0.023 335.123);
  --chart-5: oklch(0.664 0.035 153.558);
}