Whispered for shadcn/ui

Whispered is a shadcn/ui theme built around a blue primary color (#8794e8) with violet accents (#ab87e8). The light mode uses a neutral background (#ffffff). Dark mode keeps the blue primary (#8794e8) on a neutral background (#010104).

Color palette

TokenLightDark
Background
#ffffffwhite
#010104black
Foreground
#010105black
#ffffffwhite
Card
#fcfcfcsnow
#020308black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#010104black
Popover foreground
#010105black
#ffffffwhite
Primary
#8794e8cornflowerblue
#8794e8cornflowerblue
Primary foreground
#0a0f33black
#0a0f33black
Secondary
#87c5e8skyblue
#87c5e8skyblue
Secondary foreground
#0a2433black
#0a2433black
Muted
#eceeefwhitesmoke
#101213black
Muted foreground
#485156darkslategray
#a9b2b7darkgray
Accent
#ab87e8mediumpurple
#ab87e8mediumpurple
Accent foreground
#190a33black
#190a33black
Destructive
#d22714firebrick
#ed5140tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8794e8cornflowerblue
#8794e8cornflowerblue

Contrast

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

Light mode
Text on background20.83:1AAA
Text on card20.54:1AAA
Primary button6.58:1AA
Secondary button8.48:1AAA
Muted text6.94:1AA
Accent6.49:1AA
Destructive5.20:1AA
Dark mode
Text on background20.80:1AAA
Text on card20.61:1AAA
Primary button6.58:1AA
Secondary button8.48:1AAA
Muted text8.69:1AAA
Accent6.49:1AA
Destructive3.58:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.073 0.021 268.23);
  --muted: oklch(0.947 0.003 232.62);
  --muted-foreground: oklch(0.429 0.014 233.088);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.073 0.021 268.23);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.691 0.124 275.997);
  --primary-foreground: oklch(0.192 0.071 271.369);
  --secondary: oklch(0.793 0.081 234.583);
  --secondary-foreground: oklch(0.249 0.043 237.519);
  --accent: oklch(0.696 0.142 299.602);
  --accent-foreground: oklch(0.196 0.077 295.134);
  --destructive: oklch(0.558 0.208 30.519);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.691 0.124 275.997);
  --chart-1: oklch(0.691 0.124 275.997);
  --chart-2: oklch(0.793 0.081 234.583);
  --chart-3: oklch(0.696 0.142 299.602);
  --chart-4: oklch(0.815 0.072 234.229);
  --chart-5: oklch(0.688 0.13 275.8);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.078 0.015 272.502);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.182 0.004 232.906);
  --muted-foreground: oklch(0.758 0.013 232.819);
  --popover: oklch(0.078 0.015 272.502);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.099 0.019 272.502);
  --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.691 0.124 275.997);
  --primary-foreground: oklch(0.192 0.071 271.369);
  --secondary: oklch(0.793 0.081 234.583);
  --secondary-foreground: oklch(0.249 0.043 237.519);
  --accent: oklch(0.696 0.142 299.602);
  --accent-foreground: oklch(0.196 0.077 295.134);
  --destructive: oklch(0.647 0.195 29.672);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.691 0.124 275.997);
  --chart-1: oklch(0.691 0.124 275.997);
  --chart-2: oklch(0.793 0.081 234.583);
  --chart-3: oklch(0.696 0.142 299.602);
  --chart-4: oklch(0.815 0.072 234.229);
  --chart-5: oklch(0.688 0.13 275.8);
}