Mad for shadcn/ui

Mad is a shadcn/ui theme built around a pink primary color (#d14d7b) with blue accents (#4d7bd1). The light mode uses a neutral background (#fcf7f9). Dark mode keeps the pink primary (#d14d7b) on a neutral background (#030202).

Color palette

TokenLightDark
Background
#fcf7f9snow
#030202black
Foreground
#090104black
#fdfcfcsnow
Card
#fcf7f9snow
#030202black
Card foreground
#090104black
#fdfcfcsnow
Popover
#fcf7f9snow
#030202black
Popover foreground
#090104black
#fdfcfcsnow
Primary
#d14d7bindianred
#d14d7bindianred
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#7bd14dyellowgreen
#7bd14dyellowgreen
Secondary foreground
#224111darkgreen
#224111darkgreen
Muted
#e9efe6beige
#131910black
Muted foreground
#5e6b57dimgray
#9ba894darkseagreen
Accent
#4d7bd1royalblue
#4d7bd1royalblue
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#991900darkred
#fa2a00orangered
Destructive foreground
#ffd4ccbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#d14d7bindianred
#d14d7bindianred

Contrast

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

Light mode
Text on background19.52:1AAA
Text on card19.52:1AAA
Primary button4.16:1AA Large
Secondary button6.04:1AA
Muted text4.83:1AA
Accent4.14:1AA Large
Destructive6.22:1AA
Dark mode
Text on background20.25:1AAA
Text on card20.25:1AAA
Primary button4.16:1AA Large
Secondary button6.04:1AA
Muted text7.18:1AAA
Accent4.14:1AA Large
Destructive3.89:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.982 0.006 353.747);
  --foreground: oklch(0.1 0.029 352.975);
  --muted: oklch(0.945 0.013 134.296);
  --muted-foreground: oklch(0.51 0.034 134.606);
  --popover: oklch(0.982 0.006 353.747);
  --popover-foreground: oklch(0.1 0.029 352.975);
  --card: oklch(0.982 0.006 353.747);
  --card-foreground: oklch(0.1 0.029 352.975);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.609 0.171 1.983);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.779 0.187 136.356);
  --secondary-foreground: oklch(0.339 0.083 136.461);
  --accent: oklch(0.591 0.142 261.701);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.441 0.165 32.444);
  --destructive-foreground: oklch(0.905 0.049 31.249);
  --ring: oklch(0.609 0.171 1.983);
  --chart-1: oklch(0.609 0.171 1.983);
  --chart-2: oklch(0.779 0.187 136.356);
  --chart-3: oklch(0.591 0.142 261.701);
  --chart-4: oklch(0.792 0.177 136.073);
  --chart-5: oklch(0.61 0.179 2.482);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.009 353.36);
  --foreground: oklch(0.991 0.002 353.637);
  --muted: oklch(0.203 0.019 134.774);
  --muted-foreground: oklch(0.715 0.031 134.468);
  --popover: oklch(0.087 0.009 353.36);
  --popover-foreground: oklch(0.991 0.002 353.637);
  --card: oklch(0.087 0.009 353.36);
  --card-foreground: oklch(0.991 0.002 353.637);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.609 0.171 1.983);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.779 0.187 136.356);
  --secondary-foreground: oklch(0.339 0.083 136.461);
  --accent: oklch(0.591 0.142 261.701);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.632 0.242 31.66);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.609 0.171 1.983);
  --chart-1: oklch(0.609 0.171 1.983);
  --chart-2: oklch(0.779 0.187 136.356);
  --chart-3: oklch(0.591 0.142 261.701);
  --chart-4: oklch(0.792 0.177 136.073);
  --chart-5: oklch(0.61 0.179 2.482);
}