Base for shadcn/ui

Base is a shadcn/ui theme built around a vivid indigo primary color (#1e0b98) with muted light indigo accents (#d1d0dd). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the vivid indigo primary (#1e0b98) on an indigo-tinted background (#060510).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#060510black
Foreground
#030208black
#fcfcfdwhite
Card
#f9f8fcghostwhite
#060510black
Card foreground
#030208black
#fcfcfdwhite
Popover
#f9f8fcghostwhite
#060510black
Popover foreground
#030208black
#fcfcfdwhite
Primary
#1e0b98darkblue
#1e0b98darkblue
Primary foreground
#ded9fclavender
#ded9fclavender
Secondary
#d1d0ddlightgrey
#2b2932darkslategray
Secondary foreground
#363347darkslategray
#c3c1cdsilver
Muted
#ecebeflavender
#111014black
Muted foreground
#3e3e42darkslategray
#bebdc1silver
Accent
#d1d0ddlightgrey
#2b2932darkslategray
Accent foreground
#363347darkslategray
#c3c1cdsilver
Destructive
#85150fmaroon
#e12319crimson
Destructive foreground
#f9cfcdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1e0b98darkblue
#1e0b98darkblue

Contrast

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

Light mode
Text on background19.55:1AAA
Text on card19.55:1AAA
Primary button9.91:1AAA
Secondary button7.99:1AAA
Muted text8.98:1AAA
Accent7.99:1AAA
Destructive7.02:1AAA
Dark mode
Text on background19.77:1AAA
Text on card19.77:1AAA
Primary button9.91:1AAA
Secondary button8.05:1AAA
Muted text10.14:1AAA
Accent8.05:1AAA
Destructive4.71:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.004 292.458);
  --foreground: oklch(0.093 0.025 289.89);
  --muted: oklch(0.943 0.005 292.448);
  --muted-foreground: oklch(0.365 0.007 292.206);
  --popover: oklch(0.981 0.004 292.458);
  --popover-foreground: oklch(0.093 0.025 289.89);
  --card: oklch(0.981 0.004 292.458);
  --card-foreground: oklch(0.093 0.025 289.89);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.326 0.2 271.944);
  --primary-foreground: oklch(0.9 0.048 291.523);
  --secondary: oklch(0.862 0.018 292.149);
  --secondary-foreground: oklch(0.334 0.034 290.523);
  --accent: oklch(0.862 0.018 292.149);
  --accent-foreground: oklch(0.334 0.034 290.523);
  --destructive: oklch(0.399 0.148 28.938);
  --destructive-foreground: oklch(0.89 0.048 21.645);
  --ring: oklch(0.326 0.2 271.944);
  --chart-1: oklch(0.326 0.2 271.944);
  --chart-2: oklch(0.862 0.018 292.149);
  --chart-3: oklch(0.862 0.018 292.149);
  --chart-4: oklch(0.888 0.014 292.236);
  --chart-5: oklch(0.327 0.204 271.111);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.027 289.771);
  --foreground: oklch(0.991 0.002 292.508);
  --muted: oklch(0.176 0.007 291.747);
  --muted-foreground: oklch(0.801 0.005 292.418);
  --popover: oklch(0.123 0.027 289.771);
  --popover-foreground: oklch(0.991 0.002 292.508);
  --card: oklch(0.123 0.027 289.771);
  --card-foreground: oklch(0.991 0.002 292.508);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.326 0.2 271.944);
  --primary-foreground: oklch(0.9 0.048 291.523);
  --secondary: oklch(0.287 0.017 291.428);
  --secondary-foreground: oklch(0.816 0.016 292.181);
  --accent: oklch(0.287 0.017 291.428);
  --accent-foreground: oklch(0.816 0.016 292.181);
  --destructive: oklch(0.583 0.222 29.214);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.326 0.2 271.944);
  --chart-1: oklch(0.326 0.2 271.944);
  --chart-2: oklch(0.287 0.017 291.428);
  --chart-3: oklch(0.287 0.017 291.428);
  --chart-4: oklch(0.316 0.019 291.386);
  --chart-5: oklch(0.327 0.204 271.111);
}