Faucet for shadcn/ui

Faucet is a shadcn/ui theme built around a muted purple primary color (#b48eb2) with muted pink accents (#b48e9f). The light mode uses a neutral background (#fdf7fd). Dark mode keeps the muted purple primary (#b48eb2) on a neutral background (#070307).

Color palette

TokenLightDark
Background
#fdf7fdsnow
#070307black
Foreground
#160415black
#faf5faghostwhite
Card
#fcf3fcghostwhite
#0b040bblack
Card foreground
#110311black
#fcf8fcsnow
Popover
#fdf7fdsnow
#070307black
Popover foreground
#160415black
#faf5faghostwhite
Primary
#b48eb2darkgray
#b48eb2darkgray
Primary foreground
#090609black
#090609black
Secondary
#a28eb4darkgray
#a28eb4darkgray
Secondary foreground
#080609black
#080609black
Muted
#e8e4eclavender
#17131bblack
Muted foreground
#50435bdarkslategray
#b1a4bcdarkgray
Accent
#b48e9frosybrown
#b48e9frosybrown
Accent foreground
#090608black
#090608black
Destructive
#b71901firebrick
#ef2101red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b48eb2darkgray
#b48eb2darkgray

Contrast

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

Light mode
Text on background18.70:1AAA
Text on card18.49:1AAA
Primary button7.13:1AAA
Secondary button6.77:1AA
Muted text7.28:1AAA
Accent7.00:1AAA
Destructive6.67:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.25:1AAA
Primary button7.13:1AAA
Secondary button6.77:1AA
Muted text7.78:1AAA
Accent7.00:1AAA
Destructive4.31:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.01 326.63);
  --foreground: oklch(0.151 0.048 328.827);
  --muted: oklch(0.924 0.013 309.649);
  --muted-foreground: oklch(0.406 0.042 308.754);
  --popover: oklch(0.982 0.01 326.63);
  --popover-foreground: oklch(0.151 0.048 328.827);
  --card: oklch(0.973 0.015 326.676);
  --card-foreground: oklch(0.137 0.042 328.685);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.693 0.068 327.349);
  --primary-foreground: oklch(0.13 0.01 327.067);
  --secondary: oklch(0.677 0.059 308.92);
  --secondary-foreground: oklch(0.127 0.009 310.32);
  --accent: oklch(0.687 0.051 348.829);
  --accent-foreground: oklch(0.129 0.008 346.819);
  --destructive: oklch(0.498 0.192 31.236);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.693 0.068 327.349);
  --chart-1: oklch(0.693 0.068 327.349);
  --chart-2: oklch(0.677 0.059 308.92);
  --chart-3: oklch(0.687 0.051 348.829);
  --chart-4: oklch(0.704 0.054 309.029);
  --chart-5: oklch(0.692 0.078 327.465);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.11 0.02 327.747);
  --foreground: oklch(0.975 0.009 326.62);
  --muted: oklch(0.195 0.019 308.836);
  --muted-foreground: oklch(0.737 0.036 309.296);
  --popover: oklch(0.11 0.02 327.747);
  --popover-foreground: oklch(0.975 0.009 326.62);
  --card: oklch(0.126 0.023 327.8);
  --card-foreground: oklch(0.983 0.006 326.593);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.693 0.068 327.349);
  --primary-foreground: oklch(0.13 0.01 327.067);
  --secondary: oklch(0.677 0.059 308.92);
  --secondary-foreground: oklch(0.127 0.009 310.32);
  --accent: oklch(0.687 0.051 348.829);
  --accent-foreground: oklch(0.129 0.008 346.819);
  --destructive: oklch(0.606 0.236 30.934);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.693 0.068 327.349);
  --chart-1: oklch(0.693 0.068 327.349);
  --chart-2: oklch(0.677 0.059 308.92);
  --chart-3: oklch(0.687 0.051 348.829);
  --chart-4: oklch(0.704 0.054 309.029);
  --chart-5: oklch(0.692 0.078 327.465);
}