Crust for shadcn/ui

Crust is a shadcn/ui theme built around a muted indigo primary color (#474554) with muted light indigo accents (#bfbcd2). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted indigo primary (#474554) on an indigo-tinted background (#07060e).

Color palette

TokenLightDark
Background
#ffffffwhite
#07060eblack
Foreground
#060510black
#ffffffwhite
Card
#fcfcfcsnow
#090812black
Card foreground
#05040cblack
#ffffffwhite
Popover
#ffffffwhite
#07060eblack
Popover foreground
#060510black
#ffffffwhite
Primary
#474554darkslategray
#474554darkslategray
Primary foreground
#e4e3e8gainsboro
#e4e3e8gainsboro
Secondary
#d2d0dclightgrey
#282631darkslategray
Secondary foreground
#363446darkslategray
#bfbdcbsilver
Muted
#e7e6f0lavender
#110f1ablack
Muted foreground
#666666dimgray
#999999darkgray
Accent
#bfbcd2silver
#353248darkslategray
Accent foreground
#272537darkslategray
#d1cfdelightgrey
Destructive
#702901saddlebrown
#ef5801orangered
Destructive foreground
#ffc5a4navajowhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#474554darkslategray
#474554darkslategray

Contrast

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

Light mode
Text on background20.25:1AAA
Text on card19.96:1AAA
Primary button7.33:1AAA
Secondary button7.94:1AAA
Muted text4.62:1AA
Accent8.03:1AAA
Destructive6.86:1AA
Dark mode
Text on background20.15:1AAA
Text on card19.94:1AAA
Primary button7.33:1AAA
Secondary button8.04:1AAA
Muted text6.65:1AA
Accent8.02:1AAA
Destructive3.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.026 289.847);
  --muted: oklch(0.927 0.014 292.264);
  --muted-foreground: oklch(0.51 0 171.87);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.026 289.847);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.112 0.023 290.534);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.398 0.026 291.301);
  --primary-foreground: oklch(0.918 0.007 292.402);
  --secondary: oklch(0.863 0.017 292.175);
  --secondary-foreground: oklch(0.335 0.032 290.668);
  --accent: oklch(0.804 0.031 291.797);
  --accent-foreground: oklch(0.275 0.034 290.098);
  --destructive: oklch(0.38 0.11 44.067);
  --destructive-foreground: oklch(0.867 0.08 51.4);
  --ring: oklch(0.398 0.026 291.301);
  --chart-1: oklch(0.398 0.026 291.301);
  --chart-2: oklch(0.863 0.017 292.175);
  --chart-3: oklch(0.804 0.031 291.797);
  --chart-4: oklch(0.889 0.014 292.256);
  --chart-5: oklch(0.392 0.033 290.879);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.129 0.02 290.656);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.177 0.021 290.193);
  --muted-foreground: oklch(0.683 0 180);
  --popover: oklch(0.129 0.02 290.656);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.14 0.023 289.81);
  --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.398 0.026 291.301);
  --primary-foreground: oklch(0.918 0.007 292.402);
  --secondary: oklch(0.275 0.019 291.201);
  --secondary-foreground: oklch(0.805 0.02 292.08);
  --accent: oklch(0.331 0.039 290.225);
  --accent-foreground: oklch(0.86 0.02 292.098);
  --destructive: oklch(0.653 0.199 41.314);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.398 0.026 291.301);
  --chart-1: oklch(0.398 0.026 291.301);
  --chart-2: oklch(0.275 0.019 291.201);
  --chart-3: oklch(0.331 0.039 290.225);
  --chart-4: oklch(0.304 0.022 291.144);
  --chart-5: oklch(0.392 0.033 290.879);
}