Schoolhouse for shadcn/ui

Schoolhouse is a shadcn/ui theme built around a deep indigo primary color (#0c093e) with deep yellow accents (#3c3e09). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the deep indigo primary (#0c093e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#000000black
Foreground
#03020dblack
#f9f9fbghostwhite
Card
#f7f7fdghostwhite
#030303black
Card foreground
#020109black
#fcfcfdwhite
Popover
#f7f7fdghostwhite
#030303black
Popover foreground
#020109black
#fcfcfdwhite
Primary
#0c093emidnightblue
#0c093emidnightblue
Primary foreground
#908beemediumpurple
#908beemediumpurple
Secondary
#3c3e09darkolivegreen
#3c3e09darkolivegreen
Secondary foreground
#d9e232greenyellow
#d9e232greenyellow
Muted
#eaeae6linen
#191915black
Muted foreground
#4a4b3fdarkslategray
#c0c0b4silver
Accent
#3c3e09darkolivegreen
#3c3e09darkolivegreen
Accent foreground
#d9e232greenyellow
#d9e232greenyellow
Destructive
#df2a01orangered
#f42e01orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c093emidnightblue
#0c093emidnightblue

Contrast

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

Light mode
Text on background19.97:1AAA
Text on card19.48:1AAA
Primary button6.32:1AA
Secondary button7.85:1AAA
Muted text7.36:1AAA
Accent7.85:1AAA
Destructive4.69:1AA
Dark mode
Text on background19.97:1AAA
Text on card20.16:1AAA
Primary button6.32:1AA
Secondary button7.85:1AAA
Muted text9.58:1AAA
Accent7.85:1AAA
Destructive4.02:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 288.638);
  --foreground: oklch(0.101 0.032 282.805);
  --muted: oklch(0.937 0.006 108.83);
  --muted-foreground: oklch(0.408 0.02 109.599);
  --popover: oklch(0.978 0.008 288.565);
  --popover-foreground: oklch(0.088 0.028 282.991);
  --card: oklch(0.978 0.008 288.565);
  --card-foreground: oklch(0.088 0.028 282.991);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.193 0.097 274.708);
  --primary-foreground: oklch(0.684 0.144 284.178);
  --secondary: oklch(0.352 0.072 112.473);
  --secondary-foreground: oklch(0.877 0.183 112.609);
  --accent: oklch(0.352 0.072 112.473);
  --accent-foreground: oklch(0.877 0.183 112.609);
  --destructive: oklch(0.584 0.219 32.322);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.193 0.097 274.708);
  --chart-1: oklch(0.193 0.097 274.708);
  --chart-2: oklch(0.352 0.072 112.473);
  --chart-3: oklch(0.352 0.072 112.473);
  --chart-4: oklch(0.4 0.083 112.567);
  --chart-5: oklch(0.192 0.1 273.934);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.982 0.004 288.64);
  --muted: oklch(0.212 0.009 109.46);
  --muted-foreground: oklch(0.805 0.017 109.1);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.991 0.002 288.675);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.991 0.002 288.675);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.193 0.097 274.708);
  --primary-foreground: oklch(0.684 0.144 284.178);
  --secondary: oklch(0.352 0.072 112.473);
  --secondary-foreground: oklch(0.877 0.183 112.609);
  --accent: oklch(0.352 0.072 112.473);
  --accent-foreground: oklch(0.877 0.183 112.609);
  --destructive: oklch(0.623 0.234 32.208);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.193 0.097 274.708);
  --chart-1: oklch(0.193 0.097 274.708);
  --chart-2: oklch(0.352 0.072 112.473);
  --chart-3: oklch(0.352 0.072 112.473);
  --chart-4: oklch(0.4 0.083 112.567);
  --chart-5: oklch(0.192 0.1 273.934);
}