Textbook for shadcn/ui

Textbook is a shadcn/ui theme built around a vivid light orange primary color (#fcece3) with vivid light yellow accents (#fcf9e3). The light mode uses a neutral background (#fcf9f8). Dark mode keeps the vivid light orange primary (#fcece3) on an orange-tinted background (#0e0906).

Color palette

TokenLightDark
Background
#fcf9f8snow
#0e0906black
Foreground
#090402black
#fcf9f8snow
Card
#faf7f4whitesmoke
#120b08black
Card foreground
#040201black
#fdfcfcsnow
Popover
#fcf9f8snow
#0e0906black
Popover foreground
#090402black
#fcf9f8snow
Primary
#fcece3linen
#fcece3linen
Primary foreground
#411c06maroon
#411c06maroon
Secondary
#fce3e6mistyrose
#fce3e6mistyrose
Secondary foreground
#9f0f22firebrick
#9f0f22firebrick
Muted
#eee7e8linen
#181112black
Muted foreground
#4a3a3cdarkslategray
#c5b5b7silver
Accent
#fcf9e3oldlace
#fcf9e3oldlace
Accent foreground
#413906darkolivegreen
#413906darkolivegreen
Destructive
#640907maroon
#ef1e1acrimson
Destructive foreground
#f9a6a4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fcece3linen
#fcece3linen

Contrast

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

Light mode
Text on background19.50:1AAA
Text on card19.36:1AAA
Primary button13.13:1AAA
Secondary button6.73:1AA
Muted text8.79:1AAA
Accent10.93:1AAA
Destructive6.95:1AA
Dark mode
Text on background18.88:1AAA
Text on card19.01:1AAA
Primary button13.13:1AAA
Secondary button6.73:1AA
Muted text9.46:1AAA
Accent10.93:1AAA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.003 52.535);
  --foreground: oklch(0.115 0.016 63.262);
  --muted: oklch(0.934 0.008 7.948);
  --muted-foreground: oklch(0.368 0.023 9.247);
  --popover: oklch(0.985 0.003 52.535);
  --popover-foreground: oklch(0.115 0.016 63.262);
  --card: oklch(0.977 0.005 52.512);
  --card-foreground: oklch(0.091 0.013 63.262);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.954 0.022 52.282);
  --primary-foreground: oklch(0.276 0.066 47.554);
  --secondary: oklch(0.937 0.028 8.481);
  --secondary-foreground: oklch(0.448 0.173 22.94);
  --accent: oklch(0.979 0.029 99.76);
  --accent-foreground: oklch(0.344 0.067 99.93);
  --destructive: oklch(0.323 0.123 28.377);
  --destructive-foreground: oklch(0.805 0.099 20.536);
  --ring: oklch(0.954 0.022 52.282);
  --chart-1: oklch(0.954 0.022 52.282);
  --chart-2: oklch(0.937 0.028 8.481);
  --chart-3: oklch(0.979 0.029 99.76);
  --chart-4: oklch(0.969 0.014 8.098);
  --chart-5: oklch(0.954 0.022 52.272);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.146 0.011 55.635);
  --foreground: oklch(0.985 0.003 52.537);
  --muted: oklch(0.187 0.012 9.275);
  --muted-foreground: oklch(0.786 0.018 8.319);
  --popover: oklch(0.146 0.011 55.635);
  --popover-foreground: oklch(0.985 0.003 52.537);
  --card: oklch(0.159 0.013 52.558);
  --card-foreground: oklch(0.992 0.002 52.559);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.954 0.022 52.282);
  --primary-foreground: oklch(0.276 0.066 47.554);
  --secondary: oklch(0.937 0.028 8.481);
  --secondary-foreground: oklch(0.448 0.173 22.94);
  --accent: oklch(0.979 0.029 99.76);
  --accent-foreground: oklch(0.344 0.067 99.93);
  --destructive: oklch(0.607 0.237 28.588);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.954 0.022 52.282);
  --chart-1: oklch(0.954 0.022 52.282);
  --chart-2: oklch(0.937 0.028 8.481);
  --chart-3: oklch(0.979 0.029 99.76);
  --chart-4: oklch(0.969 0.014 8.098);
  --chart-5: oklch(0.954 0.022 52.272);
}