Wafer for shadcn/ui

Wafer is a shadcn/ui theme built around a muted red primary color (#b5a1a1) with muted teal accents (#a1b5b5). The light mode uses a neutral background (#fdfbfb). Dark mode keeps the muted red primary (#b5a1a1) on a red-tinted background (#0c0403).

Color palette

TokenLightDark
Background
#fdfbfbsnow
#0c0403black
Foreground
#0c0303black
#f9f6f6whitesmoke
Card
#fcf8f8snow
#100504black
Card foreground
#080202black
#fbf9f9snow
Popover
#fcf8f8snow
#100504black
Popover foreground
#080202black
#fbf9f9snow
Primary
#b5a1a1darkgray
#b5a1a1darkgray
Primary foreground
#141010black
#141010black
Secondary
#a1b5b5darkgray
#a1b5b5darkgray
Secondary foreground
#101414black
#101414black
Muted
#ecf3f4whitesmoke
#0b1313black
Muted foreground
#556262dimgray
#9da9aadarkgray
Accent
#a1b5b5darkgray
#a1b5b5darkgray
Accent foreground
#101414black
#101414black
Destructive
#7c2a03saddlebrown
#ea4e06orangered
Destructive foreground
#fdcbb4peachpuff
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b5a1a1darkgray
#b5a1a1darkgray

Contrast

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

Light mode
Text on background19.85:1AAA
Text on card19.52:1AAA
Primary button7.72:1AAA
Secondary button8.61:1AAA
Muted text5.65:1AA
Accent8.61:1AAA
Destructive6.57:1AA
Dark mode
Text on background18.93:1AAA
Text on card19.17:1AAA
Primary button7.72:1AAA
Secondary button8.61:1AAA
Muted text7.77:1AAA
Accent8.61:1AAA
Destructive3.76:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.002 18.394);
  --foreground: oklch(0.119 0.022 22.505);
  --muted: oklch(0.96 0.008 198.238);
  --muted-foreground: oklch(0.486 0.016 197.898);
  --popover: oklch(0.982 0.004 18.427);
  --popover-foreground: oklch(0.103 0.019 22.486);
  --card: oklch(0.982 0.004 18.427);
  --card-foreground: oklch(0.103 0.019 22.486);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.726 0.023 18.869);
  --primary-foreground: oklch(0.177 0.007 18.998);
  --secondary: oklch(0.757 0.022 197.941);
  --secondary-foreground: oklch(0.186 0.007 197.855);
  --accent: oklch(0.757 0.022 197.941);
  --accent-foreground: oklch(0.186 0.007 197.855);
  --destructive: oklch(0.403 0.123 40.324);
  --destructive-foreground: oklch(0.881 0.065 46.163);
  --ring: oklch(0.726 0.023 18.869);
  --chart-1: oklch(0.726 0.023 18.869);
  --chart-2: oklch(0.757 0.022 197.941);
  --chart-3: oklch(0.757 0.022 197.941);
  --chart-4: oklch(0.779 0.02 197.99);
  --chart-5: oklch(0.723 0.029 19.01);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.02 22.066);
  --foreground: oklch(0.975 0.003 18.407);
  --muted: oklch(0.179 0.011 197.482);
  --muted-foreground: oklch(0.726 0.014 198.073);
  --popover: oklch(0.133 0.023 22.155);
  --popover-foreground: oklch(0.984 0.002 18.392);
  --card: oklch(0.133 0.023 22.155);
  --card-foreground: oklch(0.984 0.002 18.392);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.726 0.023 18.869);
  --primary-foreground: oklch(0.177 0.007 18.998);
  --secondary: oklch(0.757 0.022 197.941);
  --secondary-foreground: oklch(0.186 0.007 197.855);
  --accent: oklch(0.757 0.022 197.941);
  --accent-foreground: oklch(0.186 0.007 197.855);
  --destructive: oklch(0.634 0.202 38.662);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.726 0.023 18.869);
  --chart-1: oklch(0.726 0.023 18.869);
  --chart-2: oklch(0.757 0.022 197.941);
  --chart-3: oklch(0.757 0.022 197.941);
  --chart-4: oklch(0.779 0.02 197.99);
  --chart-5: oklch(0.723 0.029 19.01);
}