Scarf for shadcn/ui

Scarf is a shadcn/ui theme built around a deep violet primary color (#1e0f24) with deep green accents (#15240f). The light mode uses a neutral background (#fbf7fc). Dark mode keeps the deep violet primary (#1e0f24) on a neutral background (#060307).

Color palette

TokenLightDark
Background
#fbf7fcghostwhite
#060307black
Foreground
#060208black
#f8f6f9whitesmoke
Card
#f9f4fbghostwhite
#09050bblack
Card foreground
#030104black
#faf9fbghostwhite
Popover
#fbf7fcghostwhite
#060307black
Popover foreground
#060208black
#f8f6f9whitesmoke
Primary
#1e0f24black
#1e0f24black
Primary foreground
#c192d3plum
#c192d3plum
Secondary
#15240fblack
#15240fblack
Secondary foreground
#68b649olivedrab
#68b649olivedrab
Muted
#eaecealinen
#141513black
Muted foreground
#656864dimgray
#989b97darkgray
Accent
#15240fblack
#15240fblack
Accent foreground
#68b649olivedrab
#68b649olivedrab
Destructive
#6f170cmaroon
#e83921orangered
Destructive foreground
#f7bdb5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1e0f24black
#1e0f24black

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.11:1AAA
Primary button7.24:1AAA
Secondary button6.46:1AA
Muted text4.74:1AA
Accent6.46:1AA
Destructive7.15:1AAA
Dark mode
Text on background19.08:1AAA
Text on card19.30:1AAA
Primary button7.24:1AAA
Secondary button6.46:1AA
Muted text6.49:1AA
Accent6.46:1AA
Destructive4.18: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.981 0.008 316.586);
  --foreground: oklch(0.105 0.023 318.464);
  --muted: oklch(0.94 0.003 136.619);
  --muted-foreground: oklch(0.514 0.007 136.651);
  --popover: oklch(0.981 0.008 316.586);
  --popover-foreground: oklch(0.105 0.023 318.464);
  --card: oklch(0.972 0.012 316.574);
  --card-foreground: oklch(0.084 0.018 318.464);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.2 0.047 315.782);
  --primary-foreground: oklch(0.726 0.106 316.161);
  --secondary: oklch(0.241 0.045 137.409);
  --secondary-foreground: oklch(0.703 0.165 137.858);
  --accent: oklch(0.241 0.045 137.409);
  --accent-foreground: oklch(0.703 0.165 137.858);
  --destructive: oklch(0.357 0.123 31.013);
  --destructive-foreground: oklch(0.849 0.069 27.191);
  --ring: oklch(0.2 0.047 315.782);
  --chart-1: oklch(0.2 0.047 315.782);
  --chart-2: oklch(0.241 0.045 137.409);
  --chart-3: oklch(0.241 0.045 137.409);
  --chart-4: oklch(0.281 0.056 137.503);
  --chart-5: oklch(0.2 0.051 315.7);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.108 0.016 317.948);
  --foreground: oklch(0.975 0.005 316.595);
  --muted: oklch(0.195 0.005 136.68);
  --muted-foreground: oklch(0.686 0.007 136.638);
  --popover: oklch(0.108 0.016 317.948);
  --popover-foreground: oklch(0.975 0.005 316.595);
  --card: oklch(0.124 0.019 317.903);
  --card-foreground: oklch(0.983 0.003 316.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.2 0.047 315.782);
  --primary-foreground: oklch(0.726 0.106 316.161);
  --secondary: oklch(0.241 0.045 137.409);
  --secondary-foreground: oklch(0.703 0.165 137.858);
  --accent: oklch(0.241 0.045 137.409);
  --accent-foreground: oklch(0.703 0.165 137.858);
  --destructive: oklch(0.611 0.214 31.033);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.2 0.047 315.782);
  --chart-1: oklch(0.2 0.047 315.782);
  --chart-2: oklch(0.241 0.045 137.409);
  --chart-3: oklch(0.241 0.045 137.409);
  --chart-4: oklch(0.281 0.056 137.503);
  --chart-5: oklch(0.2 0.051 315.7);
}