Prairie for shadcn/ui

Prairie is a shadcn/ui theme built around an indigo primary color (#371daa) with muted light indigo accents (#d5d3df). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the indigo primary (#371daa) on a neutral background (#020104).

Color palette

TokenLightDark
Background
#fcfbfewhite
#020104black
Foreground
#020104black
#ffffffwhite
Card
#fcfbfewhite
#020104black
Card foreground
#020104black
#ffffffwhite
Popover
#fcfbfewhite
#020104black
Popover foreground
#020104black
#ffffffwhite
Primary
#371daadarkslateblue
#371daadarkslateblue
Primary foreground
#fbfbfeghostwhite
#fbfbfeghostwhite
Secondary
#e9e9eclavender
#24222adarkslategray
Secondary foreground
#4d4a59darkslategray
#bbb8c6silver
Muted
#e4e4e7gainsboro
#18181bblack
Muted foreground
#48445adarkslategray
#a9a5bbdarkgray
Accent
#d5d3dfgainsboro
#38344bdarkslategray
Accent foreground
#39364adarkslategray
#d4d2e0lightgrey
Destructive
#ae2a0ffirebrick
#ee583atomato
Destructive foreground
#fef3f1seashell
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#371daadarkslateblue
#371daadarkslateblue

Contrast

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

Light mode
Text on background20.18:1AAA
Text on card20.18:1AAA
Primary button10.61:1AAA
Secondary button7.10:1AAA
Muted text7.34:1AAA
Accent7.87:1AAA
Destructive6.18:1AA
Dark mode
Text on background20.80:1AAA
Text on card20.80:1AAA
Primary button10.61:1AAA
Secondary button8.06:1AAA
Muted text7.42:1AAA
Accent7.96:1AAA
Destructive6.08:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.004 294.756);
  --foreground: oklch(0.078 0.016 293.63);
  --muted: oklch(0.92 0.005 294.726);
  --muted-foreground: oklch(0.4 0.037 293.045);
  --popover: oklch(0.99 0.004 294.756);
  --popover-foreground: oklch(0.078 0.016 293.63);
  --card: oklch(0.99 0.004 294.756);
  --card-foreground: oklch(0.078 0.016 293.63);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.381 0.204 278.89);
  --primary-foreground: oklch(0.989 0.005 294.733);
  --secondary: oklch(0.935 0.005 294.725);
  --secondary-foreground: oklch(0.418 0.024 293.726);
  --accent: oklch(0.871 0.017 294.464);
  --accent-foreground: oklch(0.344 0.036 292.835);
  --destructive: oklch(0.493 0.172 32.781);
  --destructive-foreground: oklch(0.972 0.012 31.068);
  --ring: oklch(0.381 0.204 278.89);
  --chart-1: oklch(0.381 0.204 278.89);
  --chart-2: oklch(0.935 0.005 294.725);
  --chart-3: oklch(0.871 0.017 294.464);
  --chart-4: oklch(0.959 0.003 294.764);
  --chart-5: oklch(0.38 0.21 277.914);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.079 0.015 293.755);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.21 0.007 294.199);
  --muted-foreground: oklch(0.732 0.032 294.007);
  --popover: oklch(0.079 0.015 293.755);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.079 0.015 293.755);
  --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.381 0.204 278.89);
  --primary-foreground: oklch(0.989 0.005 294.733);
  --secondary: oklch(0.257 0.016 293.668);
  --secondary-foreground: oklch(0.79 0.02 294.356);
  --accent: oklch(0.34 0.04 292.546);
  --accent-foreground: oklch(0.869 0.019 294.417);
  --destructive: oklch(0.655 0.191 33.202);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.381 0.204 278.89);
  --chart-1: oklch(0.381 0.204 278.89);
  --chart-2: oklch(0.257 0.016 293.668);
  --chart-3: oklch(0.34 0.04 292.546);
  --chart-4: oklch(0.287 0.018 293.61);
  --chart-5: oklch(0.38 0.21 277.914);
}