Whistle for shadcn/ui

Whistle is a shadcn/ui theme built around a purple primary color (#c03fe4) with purple accents (#e43fb5). The light mode uses a neutral background (#fdfbfd). Dark mode keeps the purple primary (#c03fe4) on a purple-tinted background (#0d060e).

Color palette

TokenLightDark
Background
#fdfbfdsnow
#0d060eblack
Foreground
#120316black
#ffffffwhite
Card
#fbf8fcghostwhite
#100812black
Card foreground
#0e0312black
#ffffffwhite
Popover
#fbf8fcghostwhite
#100812black
Popover foreground
#0e0312black
#ffffffwhite
Primary
#c03fe4mediumorchid
#c03fe4mediumorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#6e3fe4blueviolet
#6e3fe4blueviolet
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eae9eclavender
#141316black
Muted foreground
#524e5adarkslategray
#a8a5b1darkgray
Accent
#e43fb5hotpink
#e43fb5hotpink
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#661c05maroon
#f6673ctomato
Destructive foreground
#fbb7a2lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c03fe4mediumorchid
#c03fe4mediumorchid

Contrast

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

Light mode
Text on background19.47:1AAA
Text on card19.14:1AAA
Primary button4.14:1AA Large
Secondary button6.01:1AA
Muted text6.67:1AA
Accent3.70:1AA Large
Destructive7.15:1AAA
Dark mode
Text on background20.01:1AAA
Text on card19.75:1AAA
Primary button4.14:1AA Large
Secondary button6.01:1AA
Muted text7.67:1AAA
Accent3.70:1AA Large
Destructive6.93:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 318.889);
  --foreground: oklch(0.144 0.048 319.36);
  --muted: oklch(0.935 0.005 299.212);
  --muted-foreground: oklch(0.432 0.02 298.523);
  --popover: oklch(0.982 0.006 318.888);
  --popover-foreground: oklch(0.131 0.043 319.952);
  --card: oklch(0.982 0.006 318.888);
  --card-foreground: oklch(0.131 0.043 319.952);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.62 0.247 317.866);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.525 0.231 288.747);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.646 0.23 341.699);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.344 0.111 36.221);
  --destructive-foreground: oklch(0.837 0.084 37.618);
  --ring: oklch(0.62 0.247 317.866);
  --chart-1: oklch(0.62 0.247 317.866);
  --chart-2: oklch(0.525 0.231 288.747);
  --chart-3: oklch(0.646 0.23 341.699);
  --chart-4: oklch(0.553 0.218 290.456);
  --chart-5: oklch(0.622 0.254 317.762);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.022 319.348);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.188 0.008 298.614);
  --muted-foreground: oklch(0.728 0.017 298.899);
  --popover: oklch(0.15 0.025 318.942);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.15 0.025 318.942);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.62 0.247 317.866);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.525 0.231 288.747);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.646 0.23 341.699);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.687 0.184 37.261);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.62 0.247 317.866);
  --chart-1: oklch(0.62 0.247 317.866);
  --chart-2: oklch(0.525 0.231 288.747);
  --chart-3: oklch(0.646 0.23 341.699);
  --chart-4: oklch(0.553 0.218 290.456);
  --chart-5: oklch(0.622 0.254 317.762);
}