Wonder for shadcn/ui

Wonder is a shadcn/ui theme built around a deep purple primary color (#651f57) with deep green accents (#1f652d). The light mode uses a neutral background (#fefbfd). Dark mode keeps the deep purple primary (#651f57) on a purple-tinted background (#0b040a).

Color palette

TokenLightDark
Background
#fefbfdsnow
#0b040ablack
Foreground
#000000black
#fcf8fbsnow
Card
#fcf8fbsnow
#0f050dblack
Card foreground
#000000black
#fdfbfdsnow
Popover
#fefbfdsnow
#0b040ablack
Popover foreground
#000000black
#fcf8fbsnow
Primary
#651f57purple
#651f57purple
Primary foreground
#eec8e7thistle
#eec8e7thistle
Secondary
#1f652dforestgreen
#1f652dforestgreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#edf7efhoneydew
#08120ablack
Muted foreground
#566158dimgray
#9ea9a0darkgray
Accent
#1f652dforestgreen
#1f652dforestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c13b01firebrick
#fe7134tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#651f57purple
#651f57purple

Contrast

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

Light mode
Text on background20.45:1AAA
Text on card19.91:1AAA
Primary button7.41:1AAA
Secondary button7.05:1AAA
Muted text5.90:1AA
Accent7.05:1AAA
Destructive5.41:1AA
Dark mode
Text on background19.26:1AAA
Text on card19.43:1AAA
Primary button7.41:1AAA
Secondary button7.05:1AAA
Muted text7.86:1AAA
Accent7.05:1AAA
Destructive7.60:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.004 332.059);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.967 0.014 151.78);
  --muted-foreground: oklch(0.481 0.019 151.383);
  --popover: oklch(0.991 0.004 332.059);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.982 0.007 332.114);
  --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.371 0.122 336.63);
  --primary-foreground: oklch(0.875 0.058 332.959);
  --secondary: oklch(0.451 0.112 147.05);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.451 0.112 147.05);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.544 0.179 37.616);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.371 0.122 336.63);
  --chart-1: oklch(0.371 0.122 336.63);
  --chart-2: oklch(0.451 0.112 147.05);
  --chart-3: oklch(0.451 0.112 147.05);
  --chart-4: oklch(0.486 0.122 146.972);
  --chart-5: oklch(0.373 0.128 336.852);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.023 332.989);
  --foreground: oklch(0.983 0.006 332.098);
  --muted: oklch(0.168 0.022 150.186);
  --muted-foreground: oklch(0.722 0.018 151.634);
  --popover: oklch(0.125 0.023 332.989);
  --popover-foreground: oklch(0.983 0.006 332.098);
  --card: oklch(0.138 0.026 333.899);
  --card-foreground: oklch(0.991 0.003 332.051);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.371 0.122 336.63);
  --primary-foreground: oklch(0.875 0.058 332.959);
  --secondary: oklch(0.451 0.112 147.05);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.451 0.112 147.05);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.71 0.187 41.554);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.371 0.122 336.63);
  --chart-1: oklch(0.371 0.122 336.63);
  --chart-2: oklch(0.451 0.112 147.05);
  --chart-3: oklch(0.451 0.112 147.05);
  --chart-4: oklch(0.486 0.122 146.972);
  --chart-5: oklch(0.373 0.128 336.852);
}