Scarf for shadcn/ui

Scarf is a shadcn/ui theme built around a muted red primary color (#a66e76) with muted blue accents (#6e76a6). The light mode uses a neutral background (#fdf7f8). Dark mode keeps the muted red primary (#a66e76) on a red-tinted background (#100506).

Color palette

TokenLightDark
Background
#fdf7f8snow
#100506black
Foreground
#100406black
#faf4f5whitesmoke
Card
#fcf3f4lavenderblush
#140608black
Card foreground
#0c0304black
#fcf8f8snow
Popover
#fcf3f4lavenderblush
#140608black
Popover foreground
#0c0304black
#fcf8f8snow
Primary
#a66e76gray
#a66e76gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#76a66egray
#76a66egray
Secondary foreground
#000000black
#000000black
Muted
#d9dfd8gainsboro
#212720black
Muted foreground
#52644fdarkolivegreen
#9eb09bdarkgray
Accent
#6e76a6lightslategray
#6e76a6lightslategray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#840e01maroon
#e91801red
Destructive foreground
#ffbfb8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a66e76gray
#a66e76gray

Contrast

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

Light mode
Text on background19.01:1AAA
Text on card18.67:1AAA
Primary button4.12:1AA Large
Secondary button7.43:1AAA
Muted text4.68:1AA
Accent4.37:1AA Large
Destructive6.56:1AA
Dark mode
Text on background18.49:1AAA
Text on card18.82:1AAA
Primary button4.12:1AA Large
Secondary button7.43:1AAA
Muted text6.63:1AA
Accent4.37:1AA Large
Destructive4.55:1AA

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.007 6.763);
  --foreground: oklch(0.133 0.026 8.56);
  --muted: oklch(0.896 0.01 141.04);
  --muted-foreground: oklch(0.481 0.04 140.886);
  --popover: oklch(0.971 0.01 6.85);
  --popover-foreground: oklch(0.119 0.022 7.608);
  --card: oklch(0.971 0.01 6.85);
  --card-foreground: oklch(0.119 0.022 7.608);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.598 0.072 9.652);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.676 0.096 140.783);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.578 0.074 276.114);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.392 0.152 30.97);
  --destructive-foreground: oklch(0.861 0.074 25.928);
  --ring: oklch(0.598 0.072 9.652);
  --chart-1: oklch(0.598 0.072 9.652);
  --chart-2: oklch(0.676 0.096 140.783);
  --chart-3: oklch(0.578 0.074 276.114);
  --chart-4: oklch(0.697 0.089 140.804);
  --chart-5: oklch(0.595 0.082 10.091);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.023 8.31);
  --foreground: oklch(0.973 0.007 6.767);
  --muted: oklch(0.265 0.014 140.949);
  --muted-foreground: oklch(0.738 0.036 140.958);
  --popover: oklch(0.146 0.026 9.488);
  --popover-foreground: oklch(0.982 0.004 6.709);
  --card: oklch(0.146 0.026 9.488);
  --card-foreground: oklch(0.982 0.004 6.709);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.598 0.072 9.652);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.676 0.096 140.783);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.578 0.074 276.114);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.593 0.235 30.309);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.598 0.072 9.652);
  --chart-1: oklch(0.598 0.072 9.652);
  --chart-2: oklch(0.676 0.096 140.783);
  --chart-3: oklch(0.578 0.074 276.114);
  --chart-4: oklch(0.697 0.089 140.804);
  --chart-5: oklch(0.595 0.082 10.091);
}