Macaroon for shadcn/ui

Macaroon is a shadcn/ui theme built around a purple primary color (#ad60c3) with muted light purple accents (#d0c5d3). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the purple primary (#ad60c3) on a neutral background (#030203).

Color palette

TokenLightDark
Background
#fdfbfewhite
#030203black
Foreground
#040104black
#ffffffwhite
Card
#fcf7fdghostwhite
#060407black
Card foreground
#000000black
#ffffffwhite
Popover
#fcf7fdghostwhite
#060407black
Popover foreground
#000000black
#ffffffwhite
Primary
#ad60c3mediumorchid
#ad60c3mediumorchid
Primary foreground
#000000black
#000000black
Secondary
#d0c5d3thistle
#1f1721black
Secondary foreground
#372c3adarkslategray
#bca8c2silver
Muted
#ede6f0lavender
#170f1ablack
Muted foreground
#59535adimgray
#aaa5acdarkgray
Accent
#d0c5d3thistle
#1f1721black
Accent foreground
#372c3adarkslategray
#bca8c2silver
Destructive
#a4220efirebrick
#ef5a43tomato
Destructive foreground
#fdeae8linen
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ad60c3mediumorchid
#ad60c3mediumorchid

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card19.81:1AAA
Primary button5.24:1AA
Secondary button7.97:1AAA
Muted text6.09:1AA
Accent7.97:1AAA
Destructive6.41:1AA
Dark mode
Text on background20.73:1AAA
Text on card20.46:1AAA
Primary button5.24:1AA
Secondary button7.90:1AAA
Muted text7.74:1AAA
Accent7.90:1AAA
Destructive6.20:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 318.889);
  --foreground: oklch(0.082 0.025 321.39);
  --muted: oklch(0.933 0.016 318.884);
  --muted-foreground: oklch(0.451 0.013 318.88);
  --popover: oklch(0.981 0.01 318.887);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.01 318.887);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.616 0.163 318.604);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.837 0.021 318.881);
  --secondary-foreground: oklch(0.311 0.027 318.855);
  --accent: oklch(0.837 0.021 318.881);
  --accent-foreground: oklch(0.311 0.027 318.855);
  --destructive: oklch(0.47 0.169 31.574);
  --destructive-foreground: oklch(0.952 0.021 28.055);
  --ring: oklch(0.616 0.163 318.604);
  --chart-1: oklch(0.616 0.163 318.604);
  --chart-2: oklch(0.837 0.021 318.881);
  --chart-3: oklch(0.837 0.021 318.881);
  --chart-4: oklch(0.862 0.018 318.883);
  --chart-5: oklch(0.615 0.173 318.555);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.088 0.01 319.909);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.185 0.024 318.829);
  --muted-foreground: oklch(0.728 0.012 318.885);
  --popover: oklch(0.11 0.013 319.909);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.11 0.013 319.909);
  --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.616 0.163 318.604);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.219 0.021 318.85);
  --secondary-foreground: oklch(0.758 0.042 318.871);
  --accent: oklch(0.219 0.021 318.85);
  --accent-foreground: oklch(0.758 0.042 318.871);
  --destructive: oklch(0.66 0.188 31.258);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.616 0.163 318.604);
  --chart-1: oklch(0.616 0.163 318.604);
  --chart-2: oklch(0.219 0.021 318.85);
  --chart-3: oklch(0.219 0.021 318.85);
  --chart-4: oklch(0.25 0.026 318.845);
  --chart-5: oklch(0.615 0.173 318.555);
}