Alpaca for shadcn/ui

Alpaca is a shadcn/ui theme built around a deep violet primary color (#120a1a) with muted light violet accents (#c9c2d1). The light mode uses a neutral background (#faf8fc). Dark mode keeps the deep violet primary (#120a1a) on a neutral background (#030204).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#030204black
Foreground
#020104black
#faf8fcghostwhite
Card
#f7f4fawhitesmoke
#050307black
Card foreground
#000000black
#fcfcfdwhite
Popover
#faf8fcghostwhite
#030204black
Popover foreground
#020104black
#faf8fcghostwhite
Primary
#120a1ablack
#120a1ablack
Primary foreground
#aa86d0mediumpurple
#aa86d0mediumpurple
Secondary
#d9d6dbgainsboro
#171519black
Secondary foreground
#403b44darkslategray
#b0a8b8darkgray
Muted
#e8e6ealavender
#171519black
Muted foreground
#5e5a63dimgray
#a09ca5darkgray
Accent
#c9c2d1thistle
#302839darkslategray
Accent foreground
#302a37darkslategray
#c9c0d3thistle
Destructive
#c02e02firebrick
#fd5c2btomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#120a1ablack
#120a1ablack

Contrast

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

Light mode
Text on background19.71:1AAA
Text on card19.34:1AAA
Primary button6.49:1AA
Secondary button7.57:1AAA
Muted text5.43:1AA
Accent8.01:1AAA
Destructive5.77:1AA
Dark mode
Text on background19.66:1AAA
Text on card20.01:1AAA
Primary button6.49:1AA
Secondary button7.91:1AAA
Muted text6.72:1AA
Accent8.05:1AAA
Destructive6.73:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.005 307.724);
  --foreground: oklch(0.078 0.022 309.73);
  --muted: oklch(0.928 0.005 307.723);
  --muted-foreground: oklch(0.474 0.016 307.396);
  --popover: oklch(0.982 0.005 307.724);
  --popover-foreground: oklch(0.078 0.022 309.73);
  --card: oklch(0.972 0.008 307.69);
  --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.164 0.034 305.249);
  --primary-foreground: oklch(0.681 0.113 305.798);
  --secondary: oklch(0.88 0.008 307.686);
  --secondary-foreground: oklch(0.361 0.016 307.267);
  --accent: oklch(0.824 0.022 307.476);
  --accent-foreground: oklch(0.297 0.026 306.773);
  --destructive: oklch(0.53 0.187 34.448);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.164 0.034 305.249);
  --chart-1: oklch(0.164 0.034 305.249);
  --chart-2: oklch(0.88 0.008 307.686);
  --chart-3: oklch(0.824 0.022 307.476);
  --chart-4: oklch(0.904 0.006 307.709);
  --chart-5: oklch(0.163 0.036 305.052);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.085 0.012 308.742);
  --foreground: oklch(0.982 0.005 307.731);
  --muted: oklch(0.2 0.008 307.339);
  --muted-foreground: oklch(0.699 0.015 307.547);
  --popover: oklch(0.085 0.012 308.742);
  --popover-foreground: oklch(0.982 0.005 307.731);
  --card: oklch(0.107 0.015 308.742);
  --card-foreground: oklch(0.991 0.002 307.76);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.164 0.034 305.249);
  --primary-foreground: oklch(0.681 0.113 305.798);
  --secondary: oklch(0.199 0.01 307.223);
  --secondary-foreground: oklch(0.743 0.024 307.414);
  --accent: oklch(0.293 0.033 306.458);
  --accent-foreground: oklch(0.821 0.028 307.385);
  --destructive: oklch(0.682 0.205 36.627);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.164 0.034 305.249);
  --chart-1: oklch(0.164 0.034 305.249);
  --chart-2: oklch(0.199 0.01 307.223);
  --chart-3: oklch(0.293 0.033 306.458);
  --chart-4: oklch(0.23 0.012 307.162);
  --chart-5: oklch(0.163 0.036 305.052);
}