Teacher for shadcn/ui

Teacher is a shadcn/ui theme built around a red primary color (#b72c1a) with muted light red accents (#dfd9d8). The light mode uses a neutral background (#fefbfb). Dark mode keeps the red primary (#b72c1a) on a red-tinted background (#0e0706).

Color palette

TokenLightDark
Background
#fefbfbsnow
#0e0706black
Foreground
#000000black
#fdfcfcsnow
Card
#fdf8f7snow
#120907black
Card foreground
#000000black
#ffffffwhite
Popover
#fdf8f7snow
#120907black
Popover foreground
#000000black
#ffffffwhite
Primary
#b72c1afirebrick
#b72c1afirebrick
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dfd9d8gainsboro
#362826darkslategray
Secondary foreground
#493d3cdarkslategray
#d1bfbdsilver
Muted
#e5d4d2gainsboro
#2d1c1ablack
Muted foreground
#6a5e5cdimgray
#a39695rosybrown
Accent
#dfd9d8gainsboro
#362826darkslategray
Accent foreground
#493d3cdarkslategray
#d1bfbdsilver
Destructive
#9a2204darkred
#e03106orangered
Destructive foreground
#fedbd2bisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b72c1afirebrick
#b72c1afirebrick

Contrast

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

Light mode
Text on background20.44:1AAA
Text on card19.89:1AAA
Primary button6.18:1AA
Secondary button7.44:1AAA
Muted text4.35:1AA Large
Accent7.44:1AAA
Destructive6.24:1AA
Dark mode
Text on background19.49:1AAA
Text on card19.68:1AAA
Primary button6.18:1AA
Secondary button8.02:1AAA
Muted text5.66:1AA
Accent8.02:1AAA
Destructive4.55:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 26.459);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.883 0.019 26.597);
  --muted-foreground: oklch(0.494 0.016 26.69);
  --popover: oklch(0.982 0.006 26.479);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.006 26.479);
  --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.514 0.178 31.017);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.889 0.007 26.493);
  --secondary-foreground: oklch(0.373 0.017 26.8);
  --accent: oklch(0.889 0.007 26.493);
  --accent-foreground: oklch(0.373 0.017 26.8);
  --destructive: oklch(0.45 0.16 33.661);
  --destructive-foreground: oklch(0.918 0.041 34.322);
  --ring: oklch(0.514 0.178 31.017);
  --chart-1: oklch(0.514 0.178 31.017);
  --chart-2: oklch(0.889 0.007 26.493);
  --chart-3: oklch(0.889 0.007 26.493);
  --chart-4: oklch(0.913 0.005 26.48);
  --chart-5: oklch(0.517 0.183 31.04);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.015 29.478);
  --foreground: oklch(0.992 0.002 26.451);
  --muted: oklch(0.249 0.027 27.562);
  --muted-foreground: oklch(0.684 0.015 26.596);
  --popover: oklch(0.151 0.017 28.7);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.151 0.017 28.7);
  --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.514 0.178 31.017);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.292 0.022 27.143);
  --secondary-foreground: oklch(0.819 0.021 26.625);
  --accent: oklch(0.292 0.022 27.143);
  --accent-foreground: oklch(0.819 0.021 26.625);
  --destructive: oklch(0.59 0.214 33.108);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.514 0.178 31.017);
  --chart-1: oklch(0.514 0.178 31.017);
  --chart-2: oklch(0.292 0.022 27.143);
  --chart-3: oklch(0.292 0.022 27.143);
  --chart-4: oklch(0.321 0.026 27.176);
  --chart-5: oklch(0.517 0.183 31.04);
}