Snarl for shadcn/ui

Snarl is a shadcn/ui theme built around a muted pink primary color (#9a748e) with muted blue accents (#748e9a). The light mode uses a neutral background (#fefbfd). Dark mode keeps the muted pink primary (#9a748e) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fefbfdsnow
#000000black
Foreground
#0e020ablack
#fdfbfdsnow
Card
#fefbfdsnow
#000000black
Card foreground
#0e020ablack
#fdfbfdsnow
Popover
#fefbfdsnow
#000000black
Popover foreground
#0e020ablack
#fdfbfdsnow
Primary
#9a748egray
#9a748egray
Primary foreground
#000000black
#000000black
Secondary
#8e9a74gray
#8e9a74gray
Secondary foreground
#000000black
#000000black
Muted
#e0e3d9gainsboro
#23261cblack
Muted foreground
#5c5c5cdimgray
#a3a3a3darkgray
Accent
#748e9alightslategray
#748e9alightslategray
Accent foreground
#000000black
#000000black
Destructive
#d44f11chocolate
#d95112chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9a748egray
#9a748egray

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button5.26:1AA
Secondary button7.03:1AAA
Muted text5.13:1AA
Accent6.05:1AA
Destructive4.25:1AA Large
Dark mode
Text on background20.39:1AAA
Text on card20.39:1AAA
Primary button5.26:1AA
Secondary button7.03:1AAA
Muted text6.09:1AA
Accent6.05:1AA
Destructive4.09:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 337.348);
  --foreground: oklch(0.119 0.038 338.653);
  --muted: oklch(0.91 0.014 121.737);
  --muted-foreground: oklch(0.474 0 198.435);
  --popover: oklch(0.991 0.004 337.348);
  --popover-foreground: oklch(0.119 0.038 338.653);
  --card: oklch(0.991 0.004 337.348);
  --card-foreground: oklch(0.119 0.038 338.653);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.605 0.06 339.149);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.667 0.056 122.896);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.63 0.035 229.626);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.601 0.18 40.376);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.605 0.06 339.149);
  --chart-1: oklch(0.605 0.06 339.149);
  --chart-2: oklch(0.667 0.056 122.896);
  --chart-3: oklch(0.63 0.035 229.626);
  --chart-4: oklch(0.689 0.052 122.751);
  --chart-5: oklch(0.603 0.071 339.495);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.991 0.003 337.319);
  --muted: oklch(0.262 0.019 122.657);
  --muted-foreground: oklch(0.716 0 165.964);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.991 0.003 337.319);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.991 0.003 337.319);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.605 0.06 339.149);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.667 0.056 122.896);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.63 0.035 229.626);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.61 0.183 40.344);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.605 0.06 339.149);
  --chart-1: oklch(0.605 0.06 339.149);
  --chart-2: oklch(0.667 0.056 122.896);
  --chart-3: oklch(0.63 0.035 229.626);
  --chart-4: oklch(0.689 0.052 122.751);
  --chart-5: oklch(0.603 0.071 339.495);
}