Teacher for shadcn/ui

Teacher is a shadcn/ui theme built around a muted cyan primary color (#66757a) with muted orange accents (#7a6b66). The light mode uses a neutral background (#f7fbfc). Dark mode keeps the muted cyan primary (#66757a) on a cyan-tinted background (#050d0f).

Color palette

TokenLightDark
Background
#f7fbfcghostwhite
#050d0fblack
Foreground
#000000black
#f9fafaghostwhite
Card
#f4f9fbghostwhite
#071013black
Card foreground
#000000black
#fcfdfdwhite
Popover
#f7fbfcghostwhite
#050d0fblack
Popover foreground
#000000black
#f9fafaghostwhite
Primary
#66757adimgray
#66757adimgray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7a6b66dimgray
#7a6b66dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f6edealinen
#150c09black
Muted foreground
#6a6462dimgray
#9d9795darkgray
Accent
#7a6b66dimgray
#7a6b66dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#ce2503firebrick
#e22903orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#66757adimgray
#66757adimgray

Contrast

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

Light mode
Text on background20.19:1AAA
Text on card19.80:1AAA
Primary button4.76:1AA
Secondary button5.08:1AA
Muted text5.03:1AA
Accent5.08:1AA
Destructive5.40:1AA
Dark mode
Text on background18.77:1AAA
Text on card18.89:1AAA
Primary button4.76:1AA
Secondary button5.08:1AA
Muted text6.68:1AA
Accent5.08:1AA
Destructive4.61:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.986 0.004 219.539);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.951 0.01 39.441);
  --muted-foreground: oklch(0.508 0.008 39.409);
  --popover: oklch(0.986 0.004 219.539);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.979 0.006 219.556);
  --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.553 0.02 219.839);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.541 0.021 39.319);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.541 0.021 39.319);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.549 0.206 32.004);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.553 0.02 219.839);
  --chart-1: oklch(0.553 0.02 219.839);
  --chart-2: oklch(0.541 0.021 39.319);
  --chart-3: oklch(0.541 0.021 39.319);
  --chart-4: oklch(0.567 0.022 39.318);
  --chart-5: oklch(0.555 0.026 219.985);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.15 0.013 218.533);
  --foreground: oklch(0.985 0.001 219.515);
  --muted: oklch(0.167 0.016 39.255);
  --muted-foreground: oklch(0.681 0.008 39.436);
  --popover: oklch(0.15 0.013 218.533);
  --popover-foreground: oklch(0.985 0.001 219.515);
  --card: oklch(0.164 0.015 220.065);
  --card-foreground: oklch(0.993 0 219.511);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.553 0.02 219.839);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.541 0.021 39.319);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.541 0.021 39.319);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.588 0.222 31.895);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.553 0.02 219.839);
  --chart-1: oklch(0.553 0.02 219.839);
  --chart-2: oklch(0.541 0.021 39.319);
  --chart-3: oklch(0.541 0.021 39.319);
  --chart-4: oklch(0.567 0.022 39.318);
  --chart-5: oklch(0.555 0.026 219.985);
}