Scholarly for shadcn/ui

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

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#110408black
#fdfcfcsnow
Card
#ffffffwhite
#000000black
Card foreground
#110408black
#fdfcfcsnow
Popover
#ffffffwhite
#000000black
Popover foreground
#110408black
#fdfcfcsnow
Primary
#b6afb1darkgray
#b6afb1darkgray
Primary foreground
#1b1819black
#1b1819black
Secondary
#afb6b4darkgray
#afb6b4darkgray
Secondary foreground
#181b1ablack
#181b1ablack
Muted
#ecf4f1whitesmoke
#0b1311black
Muted foreground
#4f5956darkslategray
#a6b0addarkgray
Accent
#afb6b4darkgray
#afb6b4darkgray
Accent foreground
#181b1ablack
#181b1ablack
Destructive
#991b0adarkred
#f24c36tomato
Destructive foreground
#fdddd9mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b6afb1darkgray
#b6afb1darkgray

Contrast

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

Light mode
Text on background20.10:1AAA
Text on card20.10:1AAA
Primary button8.21:1AAA
Secondary button8.37:1AAA
Muted text6.46:1AA
Accent8.37:1AAA
Destructive6.55:1AA
Dark mode
Text on background20.50:1AAA
Text on card20.50:1AAA
Primary button8.21:1AAA
Secondary button8.37:1AAA
Muted text8.44:1AAA
Accent8.37:1AAA
Destructive3.58: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.133 0.028 357.14);
  --muted: oklch(0.959 0.009 175.349);
  --muted-foreground: oklch(0.455 0.014 174.711);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.133 0.028 357.14);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.133 0.028 357.14);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.761 0.007 355.898);
  --primary-foreground: oklch(0.214 0.003 356.075);
  --secondary: oklch(0.769 0.007 175.335);
  --secondary-foreground: oklch(0.218 0.003 175.16);
  --accent: oklch(0.769 0.007 175.335);
  --accent-foreground: oklch(0.218 0.003 175.16);
  --destructive: oklch(0.443 0.164 30.986);
  --destructive-foreground: oklch(0.922 0.036 26.745);
  --ring: oklch(0.761 0.007 355.898);
  --chart-1: oklch(0.761 0.007 355.898);
  --chart-2: oklch(0.769 0.007 175.335);
  --chart-3: oklch(0.769 0.007 175.335);
  --chart-4: oklch(0.793 0.007 175.372);
  --chart-5: oklch(0.758 0.013 356.111);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.992 0.001 355.651);
  --muted: oklch(0.178 0.013 173.342);
  --muted-foreground: oklch(0.748 0.012 175.133);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.992 0.001 355.651);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.992 0.001 355.651);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.761 0.007 355.898);
  --primary-foreground: oklch(0.214 0.003 356.075);
  --secondary: oklch(0.769 0.007 175.335);
  --secondary-foreground: oklch(0.218 0.003 175.16);
  --accent: oklch(0.769 0.007 175.335);
  --accent-foreground: oklch(0.218 0.003 175.16);
  --destructive: oklch(0.648 0.207 30.78);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.761 0.007 355.898);
  --chart-1: oklch(0.761 0.007 355.898);
  --chart-2: oklch(0.769 0.007 175.335);
  --chart-3: oklch(0.769 0.007 175.335);
  --chart-4: oklch(0.793 0.007 175.372);
  --chart-5: oklch(0.758 0.013 356.111);
}