Bacon for shadcn/ui

Bacon is a shadcn/ui theme built around a vivid deep violet primary color (#0c0222) with vivid deep green accents (#182202). The light mode uses a neutral background (#fcfbfd). Dark mode keeps the vivid deep violet primary (#0c0222) on a neutral background (#040308).

Color palette

TokenLightDark
Background
#fcfbfdsnow
#040308black
Foreground
#080411black
#ffffffwhite
Card
#fcfbfdsnow
#040308black
Card foreground
#080411black
#ffffffwhite
Popover
#fcfbfdsnow
#040308black
Popover foreground
#080411black
#ffffffwhite
Primary
#0c0222black
#0c0222black
Primary foreground
#d3c0fcthistle
#d3c0fcthistle
Secondary
#182202black
#182202black
Secondary foreground
#a0e50bchartreuse
#a0e50bchartreuse
Muted
#f0f4e7linen
#14180bblack
Muted foreground
#4f504edarkslategray
#b0b1afdarkgray
Accent
#182202black
#182202black
Accent foreground
#a0e50bchartreuse
#a0e50bchartreuse
Destructive
#be2f13firebrick
#e33916orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0c0222black
#0c0222black

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.71:1AAA
Primary button12.16:1AAA
Secondary button10.80:1AAA
Muted text7.23:1AAA
Accent10.80:1AAA
Destructive5.80:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.59:1AAA
Primary button12.16:1AAA
Secondary button10.80:1AAA
Muted text8.34:1AAA
Accent10.80:1AAA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 300.724);
  --foreground: oklch(0.123 0.032 299.612);
  --muted: oklch(0.959 0.018 121.069);
  --muted-foreground: oklch(0.43 0.003 120.869);
  --popover: oklch(0.991 0.003 300.724);
  --popover-foreground: oklch(0.123 0.032 299.612);
  --card: oklch(0.991 0.003 300.724);
  --card-foreground: oklch(0.123 0.032 299.612);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.14 0.069 293.141);
  --primary-foreground: oklch(0.843 0.085 299.074);
  --secondary: oklch(0.234 0.056 125.063);
  --secondary-foreground: oklch(0.844 0.22 128.424);
  --accent: oklch(0.234 0.056 125.063);
  --accent-foreground: oklch(0.844 0.22 128.424);
  --destructive: oklch(0.529 0.184 32.826);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.14 0.069 293.141);
  --chart-1: oklch(0.14 0.069 293.141);
  --chart-2: oklch(0.234 0.056 125.063);
  --chart-3: oklch(0.234 0.056 125.063);
  --chart-4: oklch(0.288 0.071 126.127);
  --chart-5: oklch(0.139 0.071 292.87);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.019 301.099);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.202 0.025 122.927);
  --muted-foreground: oklch(0.759 0.002 120.817);
  --popover: oklch(0.101 0.019 301.099);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.101 0.019 301.099);
  --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.14 0.069 293.141);
  --primary-foreground: oklch(0.843 0.085 299.074);
  --secondary: oklch(0.234 0.056 125.063);
  --secondary-foreground: oklch(0.844 0.22 128.424);
  --accent: oklch(0.234 0.056 125.063);
  --accent-foreground: oklch(0.844 0.22 128.424);
  --destructive: oklch(0.603 0.211 32.747);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.14 0.069 293.141);
  --chart-1: oklch(0.14 0.069 293.141);
  --chart-2: oklch(0.234 0.056 125.063);
  --chart-3: oklch(0.234 0.056 125.063);
  --chart-4: oklch(0.288 0.071 126.127);
  --chart-5: oklch(0.139 0.071 292.87);
}