Scholarly for shadcn/ui

Scholarly is a shadcn/ui theme built around a vivid blue primary color (#5096ed) with neutral gray accents (#dcdee0). The light mode uses a neutral background (#f8fafc). Dark mode keeps the vivid blue primary (#5096ed) on a neutral background (#020204).

Color palette

TokenLightDark
Background
#f8fafcghostwhite
#020204black
Foreground
#000000black
#ffffffwhite
Card
#f8fafcghostwhite
#020204black
Card foreground
#000000black
#ffffffwhite
Popover
#f8fafcghostwhite
#020204black
Popover foreground
#000000black
#ffffffwhite
Primary
#5096edcornflowerblue
#5096edcornflowerblue
Primary foreground
#010509black
#010509black
Secondary
#dcdee0gainsboro
#161b22black
Secondary foreground
#414449darkslategray
#a6b4c4silver
Muted
#eceff3whitesmoke
#0c0f13black
Muted foreground
#515d6cdimgray
#939faedarkgray
Accent
#dcdee0gainsboro
#161b22black
Accent foreground
#414449darkslategray
#a6b4c4silver
Destructive
#b40404darkred
#f00505red
Destructive foreground
#ffebeblinen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5096edcornflowerblue
#5096edcornflowerblue

Contrast

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

Light mode
Text on background20.02:1AAA
Text on card20.02:1AAA
Primary button6.75:1AA
Secondary button7.22:1AAA
Muted text5.83:1AA
Accent7.22:1AAA
Destructive6.20:1AA
Dark mode
Text on background20.70:1AAA
Text on card20.70:1AAA
Primary button6.75:1AA
Secondary button8.15:1AAA
Muted text7.14:1AAA
Accent8.15:1AAA
Destructive4.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.004 253.246);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.952 0.006 253.262);
  --muted-foreground: oklch(0.474 0.028 253.552);
  --popover: oklch(0.983 0.004 253.246);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.004 253.246);
  --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.668 0.147 254.7);
  --primary-foreground: oklch(0.108 0.019 241.113);
  --secondary: oklch(0.899 0.004 253.246);
  --secondary-foreground: oklch(0.386 0.009 253.369);
  --accent: oklch(0.899 0.004 253.246);
  --accent-foreground: oklch(0.386 0.009 253.369);
  --destructive: oklch(0.485 0.197 29.035);
  --destructive-foreground: oklch(0.956 0.021 17.532);
  --ring: oklch(0.668 0.147 254.7);
  --chart-1: oklch(0.668 0.147 254.7);
  --chart-2: oklch(0.899 0.004 253.246);
  --chart-3: oklch(0.899 0.004 253.246);
  --chart-4: oklch(0.922 0.003 253.239);
  --chart-5: oklch(0.668 0.152 254.799);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.089 0.007 247.502);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.167 0.009 253.535);
  --muted-foreground: oklch(0.699 0.025 253.438);
  --popover: oklch(0.089 0.007 247.502);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.089 0.007 247.502);
  --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.668 0.147 254.7);
  --primary-foreground: oklch(0.108 0.019 241.113);
  --secondary: oklch(0.222 0.014 253.579);
  --secondary-foreground: oklch(0.763 0.028 253.439);
  --accent: oklch(0.222 0.014 253.579);
  --accent-foreground: oklch(0.763 0.028 253.439);
  --destructive: oklch(0.601 0.245 29.095);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.668 0.147 254.7);
  --chart-1: oklch(0.668 0.147 254.7);
  --chart-2: oklch(0.222 0.014 253.579);
  --chart-3: oklch(0.222 0.014 253.579);
  --chart-4: oklch(0.253 0.018 253.603);
  --chart-5: oklch(0.668 0.152 254.799);
}