Wobbly for shadcn/ui

Wobbly is a shadcn/ui theme built around a violet primary color (#9a83c3) with muted light violet accents (#d2cfd8). The light mode uses a neutral background (#f9f7fc). Dark mode keeps the violet primary (#9a83c3) on a violet-tinted background (#07050a).

Color palette

TokenLightDark
Background
#f9f7fcghostwhite
#07050ablack
Foreground
#000000black
#faf9fbghostwhite
Card
#f6f4fbghostwhite
#09070dblack
Card foreground
#000000black
#fcfcfdwhite
Popover
#f6f4fbghostwhite
#09070dblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#9a83c3mediumpurple
#9a83c3mediumpurple
Primary foreground
#09070eblack
#09070eblack
Secondary
#eaeaeblavender
#1d1924black
Secondary foreground
#514f54darkslategray
#b4abc4silver
Muted
#d8d5ddgainsboro
#25222adarkslategray
Muted foreground
#49484cdarkslategray
#b4b3b7silver
Accent
#d2cfd8lightgrey
#2f2640darkslategray
Accent foreground
#393541darkslategray
#c8bfd9thistle
Destructive
#d40b08red
#f71b18red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9a83c3mediumpurple
#9a83c3mediumpurple

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.21:1AAA
Primary button6.11:1AA
Secondary button6.73:1AA
Muted text6.24:1AA
Accent7.78:1AAA
Destructive5.46:1AA
Dark mode
Text on background19.30:1AAA
Text on card19.53:1AAA
Primary button6.11:1AA
Secondary button7.83:1AAA
Muted text7.48:1AAA
Accent8.10:1AAA
Destructive4.10:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.007 302.104);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.877 0.011 302.021);
  --muted-foreground: oklch(0.404 0.008 301.919);
  --popover: oklch(0.97 0.01 302.047);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.97 0.01 302.047);
  --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.655 0.097 299.824);
  --primary-foreground: oklch(0.134 0.017 301.681);
  --secondary: oklch(0.938 0.002 302.185);
  --secondary-foreground: oklch(0.432 0.008 301.914);
  --accent: oklch(0.86 0.012 301.99);
  --accent-foreground: oklch(0.337 0.021 301.232);
  --destructive: oklch(0.548 0.221 29.107);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.655 0.097 299.824);
  --chart-1: oklch(0.655 0.097 299.824);
  --chart-2: oklch(0.938 0.002 302.185);
  --chart-3: oklch(0.86 0.012 301.99);
  --chart-4: oklch(0.961 0.001 302.196);
  --chart-5: oklch(0.65 0.105 299.584);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.123 0.013 302.543);
  --foreground: oklch(0.983 0.003 302.169);
  --muted: oklch(0.26 0.015 301.329);
  --muted-foreground: oklch(0.769 0.006 302.082);
  --popover: oklch(0.136 0.015 301.734);
  --popover-foreground: oklch(0.991 0.001 302.191);
  --card: oklch(0.136 0.015 301.734);
  --card-foreground: oklch(0.991 0.001 302.191);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.655 0.097 299.824);
  --primary-foreground: oklch(0.134 0.017 301.681);
  --secondary: oklch(0.224 0.021 300.757);
  --secondary-foreground: oklch(0.758 0.036 301.477);
  --accent: oklch(0.291 0.049 299.472);
  --accent-foreground: oklch(0.82 0.038 301.485);
  --destructive: oklch(0.62 0.244 28.731);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.655 0.097 299.824);
  --chart-1: oklch(0.655 0.097 299.824);
  --chart-2: oklch(0.224 0.021 300.757);
  --chart-3: oklch(0.291 0.049 299.472);
  --chart-4: oklch(0.253 0.025 300.65);
  --chart-5: oklch(0.65 0.105 299.584);
}