Scarf for shadcn/ui

Scarf is a shadcn/ui theme built around a purple primary color (#c13cc3) with muted light purple accents (#cfc4cf). The light mode uses a neutral background (#fdf6fd). Dark mode keeps the purple primary (#c13cc3) on a purple-tinted background (#0f050f).

Color palette

TokenLightDark
Background
#fdf6fdsnow
#0f050fblack
Foreground
#040104black
#fbf9fbsnow
Card
#fdf6fdsnow
#0f050fblack
Card foreground
#040104black
#fbf9fbsnow
Popover
#fdf6fdsnow
#0f050fblack
Popover foreground
#040104black
#fbf9fbsnow
Primary
#c13cc3mediumorchid
#c13cc3mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#dedddfgainsboro
#302130darkslategray
Secondary foreground
#464346darkslategray
#ccb7cdthistle
Muted
#e7d5e7gainsboro
#2a182ablack
Muted foreground
#745874dimgray
#a78ba7darkgray
Accent
#cfc4cfthistle
#482d49darkslategray
Accent foreground
#362b36darkslategray
#dec9dethistle
Destructive
#92190cdarkred
#ec2d18orangered
Destructive foreground
#fcd8d5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c13cc3mediumorchid
#c13cc3mediumorchid

Contrast

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

Light mode
Text on background19.61:1AAA
Text on card19.61:1AAA
Primary button4.47:1AA Large
Secondary button7.22:1AAA
Muted text4.43:1AA Large
Accent7.98:1AAA
Destructive6.70:1AA
Dark mode
Text on background19.08:1AAA
Text on card19.08:1AAA
Primary button4.47:1AA Large
Secondary button8.06:1AAA
Muted text5.46:1AA
Accent7.75:1AAA
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.012 325.184);
  --foreground: oklch(0.086 0.019 326.611);
  --muted: oklch(0.892 0.032 325.345);
  --muted-foreground: oklch(0.498 0.056 325.845);
  --popover: oklch(0.982 0.012 325.184);
  --popover-foreground: oklch(0.086 0.019 326.611);
  --card: oklch(0.982 0.012 325.184);
  --card-foreground: oklch(0.086 0.019 326.611);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.599 0.225 327.232);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.9 0.002 325.118);
  --secondary-foreground: oklch(0.388 0.006 325.204);
  --accent: oklch(0.832 0.021 325.271);
  --accent-foreground: oklch(0.305 0.024 325.624);
  --destructive: oklch(0.428 0.158 30.517);
  --destructive-foreground: oklch(0.912 0.04 25.403);
  --ring: oklch(0.599 0.225 327.232);
  --chart-1: oklch(0.599 0.225 327.232);
  --chart-2: oklch(0.9 0.002 325.118);
  --chart-3: oklch(0.832 0.021 325.271);
  --chart-4: oklch(0.923 0.002 325.114);
  --chart-5: oklch(0.603 0.234 327.281);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.028 326.429);
  --foreground: oklch(0.984 0.003 325.121);
  --muted: oklch(0.241 0.043 326.244);
  --muted-foreground: oklch(0.671 0.053 325.625);
  --popover: oklch(0.139 0.028 326.429);
  --popover-foreground: oklch(0.984 0.003 325.121);
  --card: oklch(0.139 0.028 326.429);
  --card-foreground: oklch(0.984 0.003 325.121);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.599 0.225 327.232);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.273 0.034 325.907);
  --secondary-foreground: oklch(0.804 0.039 325.429);
  --accent: oklch(0.341 0.06 326.228);
  --accent-foreground: oklch(0.86 0.036 325.387);
  --destructive: oklch(0.61 0.227 30.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.599 0.225 327.232);
  --chart-1: oklch(0.599 0.225 327.232);
  --chart-2: oklch(0.273 0.034 325.907);
  --chart-3: oklch(0.341 0.06 326.228);
  --chart-4: oklch(0.303 0.039 325.938);
  --chart-5: oklch(0.603 0.234 327.281);
}