Scarf for shadcn/ui

Scarf is a shadcn/ui theme built around a purple primary color (#c972d5) with muted light purple accents (#decce0). The light mode uses a neutral background (#fbf8fc). Dark mode keeps the purple primary (#c972d5) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#fbf8fcghostwhite
#070307black
Foreground
#0b030cblack
#faf4faghostwhite
Card
#fbf8fcghostwhite
#070307black
Card foreground
#0b030cblack
#faf4faghostwhite
Popover
#fbf8fcghostwhite
#070307black
Popover foreground
#0b030cblack
#faf4faghostwhite
Primary
#c972d5orchid
#c972d5orchid
Primary foreground
#0e0510black
#0e0510black
Secondary
#ede7eelavender
#2f2131darkslategray
Secondary foreground
#5d4360dimgray
#cbb6cethistle
Muted
#efe5f0lavender
#180f1ablack
Muted foreground
#463847darkslategray
#c5b8c7silver
Accent
#decce0thistle
#4a2d4edarkslategray
Accent foreground
#482f4cdarkslategray
#dfcbe1thistle
Destructive
#640707maroon
#e81111red
Destructive foreground
#f8a5a5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c972d5orchid
#c972d5orchid

Contrast

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

Light mode
Text on background19.31:1AAA
Text on card19.31:1AAA
Primary button6.52:1AA
Secondary button7.08:1AAA
Muted text8.94:1AAA
Accent7.75:1AAA
Destructive6.93:1AA
Dark mode
Text on background18.91:1AAA
Text on card18.91:1AAA
Primary button6.52:1AA
Secondary button8.06:1AAA
Muted text9.83:1AAA
Accent7.77:1AAA
Destructive4.62:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 322.134);
  --foreground: oklch(0.122 0.031 323.797);
  --muted: oklch(0.933 0.017 322.176);
  --muted-foreground: oklch(0.361 0.032 322.398);
  --popover: oklch(0.983 0.006 322.134);
  --popover-foreground: oklch(0.122 0.031 323.797);
  --card: oklch(0.983 0.006 322.134);
  --card-foreground: oklch(0.122 0.031 323.797);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.684 0.167 322.783);
  --primary-foreground: oklch(0.137 0.031 323.196);
  --secondary: oklch(0.935 0.012 322.156);
  --secondary-foreground: oklch(0.422 0.058 322.542);
  --accent: oklch(0.866 0.033 322.239);
  --accent-foreground: oklch(0.346 0.06 322.638);
  --destructive: oklch(0.321 0.123 27.9);
  --destructive-foreground: oklch(0.803 0.099 19.47);
  --ring: oklch(0.684 0.167 322.783);
  --chart-1: oklch(0.684 0.167 322.783);
  --chart-2: oklch(0.935 0.012 322.156);
  --chart-3: oklch(0.866 0.033 322.239);
  --chart-4: oklch(0.959 0.007 322.139);
  --chart-5: oklch(0.684 0.176 322.802);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.109 0.018 323.434);
  --foreground: oklch(0.974 0.01 322.147);
  --muted: oklch(0.186 0.026 322.543);
  --muted-foreground: oklch(0.797 0.026 322.223);
  --popover: oklch(0.109 0.018 323.434);
  --popover-foreground: oklch(0.974 0.01 322.147);
  --card: oklch(0.109 0.018 323.434);
  --card-foreground: oklch(0.974 0.01 322.147);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.684 0.167 322.783);
  --primary-foreground: oklch(0.137 0.031 323.196);
  --secondary: oklch(0.271 0.036 322.531);
  --secondary-foreground: oklch(0.801 0.041 322.286);
  --accent: oklch(0.346 0.067 322.687);
  --accent-foreground: oklch(0.865 0.037 322.255);
  --destructive: oklch(0.59 0.236 28.667);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.684 0.167 322.783);
  --chart-1: oklch(0.684 0.167 322.783);
  --chart-2: oklch(0.271 0.036 322.531);
  --chart-3: oklch(0.346 0.067 322.687);
  --chart-4: oklch(0.3 0.042 322.546);
  --chart-5: oklch(0.684 0.176 322.802);
}