Base16 Dark Codeschool for shadcn/ui

Base16 Dark Codeschool is a shadcn/ui theme built around a neutral gray primary color (#9fa8a7) with muted blue accents (#42535c). The light mode uses a blue-tinted background (#222b30). Dark mode keeps the neutral gray primary (#9fa8a7) on a blue-tinted background (#222b30).

Color palette

TokenLightDark
Background
#222b30darkslategray
#222b30darkslategray
Foreground
#9fa8a7darkgray
#9fa8a7darkgray
Card
#1e262adarkslategray
#1e262adarkslategray
Card foreground
#acb4b3darkgray
#acb4b3darkgray
Popover
#1c2327black
#1c2327black
Popover foreground
#b9c0bfsilver
#b9c0bfsilver
Primary
#9fa8a7darkgray
#9fa8a7darkgray
Primary foreground
#0a0b0bblack
#0a0b0bblack
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#2d3539darkslategray
#2d3539darkslategray
Muted foreground
#a9b5bcdarkgray
#a9b5bcdarkgray
Accent
#42535cdarkslategray
#42535cdarkslategray
Accent foreground
#e4e9eclavender
#e4e9eclavender
Destructive
#ec3636crimson
#ec3636crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#323739darkslategray
#323739darkslategray
Input
#393e41darkslategray
#393e41darkslategray
Ring
#9fa8a7darkgray
#9fa8a7darkgray

Contrast

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

Light mode
Text on background5.93:1AA
Text on card7.31:1AAA
Primary button8.07:1AAA
Secondary button7.37:1AAA
Muted text5.97:1AA
Accent6.53:1AA
Destructive4.06:1AA Large
Dark mode
Text on background5.93:1AA
Text on card7.31:1AAA
Primary button8.07:1AAA
Secondary button7.37:1AAA
Muted text5.97:1AA
Accent6.53:1AA
Destructive4.06:1AA Large

CSS variables

Paste this into your globals.css to use Base16 Dark Codeschool in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.282 0.015 231.54);
  --foreground: oklch(0.723 0.011 188.563);
  --muted: oklch(0.323 0.013 231.288);
  --muted-foreground: oklch(0.767 0.016 230.96);
  --popover: oklch(0.25 0.013 231.483);
  --popover-foreground: oklch(0.802 0.007 188.69);
  --card: oklch(0.261 0.014 231.504);
  --card-foreground: oklch(0.763 0.009 188.63);
  --border: oklch(0.332 0.008 231.013);
  --input: oklch(0.362 0.009 231.023);
  --primary: oklch(0.723 0.011 188.563);
  --primary-foreground: oklch(0.147 0.002 188.633);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.431 0.027 231.689);
  --accent-foreground: oklch(0.932 0.007 230.756);
  --destructive: oklch(0.619 0.218 26.369);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.723 0.011 188.563);
  --chart-1: oklch(0.723 0.011 188.563);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.431 0.027 231.689);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.728 0.017 188.361);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.282 0.015 231.54);
  --foreground: oklch(0.723 0.011 188.563);
  --muted: oklch(0.323 0.013 231.288);
  --muted-foreground: oklch(0.767 0.016 230.96);
  --popover: oklch(0.25 0.013 231.483);
  --popover-foreground: oklch(0.802 0.007 188.69);
  --card: oklch(0.261 0.014 231.504);
  --card-foreground: oklch(0.763 0.009 188.63);
  --border: oklch(0.332 0.008 231.013);
  --input: oklch(0.362 0.009 231.023);
  --primary: oklch(0.723 0.011 188.563);
  --primary-foreground: oklch(0.147 0.002 188.633);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.431 0.027 231.689);
  --accent-foreground: oklch(0.932 0.007 230.756);
  --destructive: oklch(0.619 0.218 26.369);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.723 0.011 188.563);
  --chart-1: oklch(0.723 0.011 188.563);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.431 0.027 231.689);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.728 0.017 188.361);
}