good bread for shadcn/ui

good bread is a shadcn/ui theme built around a deep indigo primary color (#343163) with deep yellow accents (#606331). The light mode uses a neutral background (#f8f7fd). Dark mode keeps the deep indigo primary (#343163) on a neutral background (#030307).

Color palette

TokenLightDark
Background
#f8f7fdghostwhite
#030307black
Foreground
#04040cblack
#f8f8fcghostwhite
Card
#f8f7fdghostwhite
#030307black
Card foreground
#04040cblack
#f8f8fcghostwhite
Popover
#f8f7fdghostwhite
#030307black
Popover foreground
#04040cblack
#f8f8fcghostwhite
Primary
#343163darkslategray
#343163darkslategray
Primary foreground
#dbd9ecgainsboro
#dbd9ecgainsboro
Secondary
#606331darkolivegreen
#606331darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eaebdbbeige
#232414black
Muted foreground
#5a5a58dimgray
#a7a7a5darkgray
Accent
#606331darkolivegreen
#606331darkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#732807saddlebrown
#dd4c0echocolate
Destructive foreground
#fac8b2peachpuff
#ffffffwhite
Border
#eaeaeblavender
#1e1e20black
Input
#eaeaeblavender
#1e1e20black
Ring
#343163darkslategray
#343163darkslategray

Contrast

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

Light mode
Text on background19.19:1AAA
Text on card19.19:1AAA
Primary button8.59:1AAA
Secondary button6.31:1AA
Muted text5.73:1AA
Accent6.31:1AA
Destructive6.87:1AA
Dark mode
Text on background19.43:1AAA
Text on card19.43:1AAA
Primary button8.59:1AAA
Secondary button6.31:1AA
Muted text6.52:1AA
Accent6.31:1AA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.979 0.007 289.346);
  --foreground: oklch(0.111 0.022 286.425);
  --muted: oklch(0.935 0.022 109.906);
  --muted-foreground: oklch(0.467 0.003 109.591);
  --popover: oklch(0.979 0.007 289.346);
  --popover-foreground: oklch(0.111 0.022 286.425);
  --card: oklch(0.979 0.007 289.346);
  --card-foreground: oklch(0.111 0.022 286.425);
  --border: oklch(0.937 0.002 289.446);
  --input: oklch(0.937 0.002 289.446);
  --primary: oklch(0.343 0.086 283.925);
  --primary-foreground: oklch(0.893 0.026 288.927);
  --secondary: oklch(0.485 0.072 112.159);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.485 0.072 112.159);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.384 0.114 40.025);
  --destructive-foreground: oklch(0.871 0.065 44.381);
  --ring: oklch(0.343 0.086 283.925);
  --chart-1: oklch(0.343 0.086 283.925);
  --chart-2: oklch(0.485 0.072 112.159);
  --chart-3: oklch(0.485 0.072 112.159);
  --chart-4: oklch(0.52 0.078 112.187);
  --chart-5: oklch(0.338 0.093 283.231);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.015 287.284);
  --foreground: oklch(0.981 0.005 289.388);
  --muted: oklch(0.255 0.028 111.491);
  --muted-foreground: oklch(0.727 0.003 109.544);
  --popover: oklch(0.101 0.015 287.284);
  --popover-foreground: oklch(0.981 0.005 289.388);
  --card: oklch(0.101 0.015 287.284);
  --card-foreground: oklch(0.981 0.005 289.388);
  --border: oklch(0.235 0.003 289.199);
  --input: oklch(0.235 0.003 289.199);
  --primary: oklch(0.343 0.086 283.925);
  --primary-foreground: oklch(0.893 0.026 288.927);
  --secondary: oklch(0.485 0.072 112.159);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.485 0.072 112.159);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.61 0.191 38.795);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.343 0.086 283.925);
  --chart-1: oklch(0.343 0.086 283.925);
  --chart-2: oklch(0.485 0.072 112.159);
  --chart-3: oklch(0.485 0.072 112.159);
  --chart-4: oklch(0.52 0.078 112.187);
  --chart-5: oklch(0.338 0.093 283.231);
}