Campanile for shadcn/ui

Campanile is a shadcn/ui theme built around a vivid yellow primary color (#e19f0e) with vivid green accents (#bbe10e). The light mode uses a neutral background (#fefdfb). Dark mode keeps the vivid yellow primary (#e19f0e) on a neutral background (#030302).

Color palette

TokenLightDark
Background
#fefdfbsnow
#030302black
Foreground
#0e0a02black
#faf8f5whitesmoke
Card
#fdfbf7snow
#070603black
Card foreground
#090701black
#fbfaf8snow
Popover
#fefdfbsnow
#030302black
Popover foreground
#0e0a02black
#faf8f5whitesmoke
Primary
#e19f0egoldenrod
#e19f0egoldenrod
Primary foreground
#221802black
#221802black
Secondary
#e1350eorangered
#e1350eorangered
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#ebe6e5linen
#1a1514black
Muted foreground
#725a55dimgray
#aa928drosybrown
Accent
#bbe10egreenyellow
#bbe10egreenyellow
Accent foreground
#1c2202black
#1c2202black
Destructive
#662000maroon
#ff6924tomato
Destructive foreground
#ffb999burlywood
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e19f0egoldenrod
#e19f0egoldenrod

Contrast

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

Light mode
Text on background19.44:1AAA
Text on card19.50:1AAA
Primary button7.62:1AAA
Secondary button4.44:1AA Large
Muted text5.14:1AA
Accent10.87:1AAA
Destructive7.12:1AAA
Dark mode
Text on background19.46:1AAA
Text on card19.44:1AAA
Primary button7.62:1AAA
Secondary button4.44:1AA Large
Muted text6.19:1AA
Accent10.87:1AAA
Destructive7.30:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 86.019);
  --foreground: oklch(0.146 0.024 92.385);
  --muted: oklch(0.929 0.005 32.661);
  --muted-foreground: oklch(0.491 0.033 32.842);
  --popover: oklch(0.994 0.003 86.019);
  --popover-foreground: oklch(0.146 0.024 92.385);
  --card: oklch(0.989 0.006 86.031);
  --card-foreground: oklch(0.127 0.021 93.813);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.747 0.153 77.907);
  --primary-foreground: oklch(0.214 0.04 85.422);
  --secondary: oklch(0.596 0.213 33.025);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.852 0.203 121.428);
  --accent-foreground: oklch(0.236 0.052 119.076);
  --destructive: oklch(0.35 0.108 40.97);
  --destructive-foreground: oklch(0.844 0.092 45.858);
  --ring: oklch(0.747 0.153 77.907);
  --chart-1: oklch(0.747 0.153 77.907);
  --chart-2: oklch(0.596 0.213 33.025);
  --chart-3: oklch(0.852 0.203 121.428);
  --chart-4: oklch(0.624 0.223 32.982);
  --chart-5: oklch(0.753 0.156 77.324);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.096 0.007 89.582);
  --foreground: oklch(0.98 0.004 86.024);
  --muted: oklch(0.202 0.008 32.715);
  --muted-foreground: oklch(0.681 0.03 32.739);
  --popover: oklch(0.096 0.007 89.582);
  --popover-foreground: oklch(0.98 0.004 86.024);
  --card: oklch(0.121 0.008 89.582);
  --card-foreground: oklch(0.987 0.003 86.018);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.747 0.153 77.907);
  --primary-foreground: oklch(0.214 0.04 85.422);
  --secondary: oklch(0.596 0.213 33.025);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.852 0.203 121.428);
  --accent-foreground: oklch(0.236 0.052 119.076);
  --destructive: oklch(0.701 0.198 41.575);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.747 0.153 77.907);
  --chart-1: oklch(0.747 0.153 77.907);
  --chart-2: oklch(0.596 0.213 33.025);
  --chart-3: oklch(0.852 0.203 121.428);
  --chart-4: oklch(0.624 0.223 32.982);
  --chart-5: oklch(0.753 0.156 77.324);
}