Zigzag for shadcn/ui

Zigzag is a shadcn/ui theme built around a violet primary color (#b196de) with neutral gray accents (#d8d7da). The light mode uses a neutral background (#ffffff). Dark mode keeps the violet primary (#b196de) on a violet-tinted background (#07050b).

Color palette

TokenLightDark
Background
#ffffffwhite
#07050bblack
Foreground
#07030cblack
#ffffffwhite
Card
#ffffffwhite
#07050bblack
Card foreground
#07030cblack
#ffffffwhite
Popover
#ffffffwhite
#07050bblack
Popover foreground
#07030cblack
#ffffffwhite
Primary
#b196deplum
#b196deplum
Primary foreground
#1d1032black
#1d1032black
Secondary
#d8d7dagainsboro
#232027black
Secondary foreground
#3f3d42darkslategray
#bbb6c3silver
Muted
#e0dde4gainsboro
#1e1b22black
Muted foreground
#5a5463dimgray
#a19cabdarkgray
Accent
#d8d7dagainsboro
#232027black
Accent foreground
#3f3d42darkslategray
#bbb6c3silver
Destructive
#721e09maroon
#f0613dtomato
Destructive foreground
#f9c1b3lightpink
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#b196deplum
#b196deplum

Contrast

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

Light mode
Text on background20.44:1AAA
Text on card20.44:1AAA
Primary button7.07:1AAA
Secondary button7.50:1AAA
Muted text5.41:1AA
Accent7.50:1AAA
Destructive7.00:1AAA
Dark mode
Text on background20.32:1AAA
Text on card20.32:1AAA
Primary button7.07:1AAA
Secondary button8.09:1AAA
Muted text6.35:1AA
Accent8.09:1AAA
Destructive6.47:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.115 0.024 303.525);
  --muted: oklch(0.902 0.009 302.769);
  --muted-foreground: oklch(0.458 0.024 302.114);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.115 0.024 303.525);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.115 0.024 303.525);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.724 0.105 300.644);
  --primary-foreground: oklch(0.211 0.066 297.39);
  --secondary: oklch(0.882 0.004 302.854);
  --secondary-foreground: oklch(0.365 0.009 302.553);
  --accent: oklch(0.882 0.004 302.854);
  --accent-foreground: oklch(0.365 0.009 302.553);
  --destructive: oklch(0.369 0.121 34.46);
  --destructive-foreground: oklch(0.858 0.068 34.429);
  --ring: oklch(0.724 0.105 300.644);
  --chart-1: oklch(0.724 0.105 300.644);
  --chart-2: oklch(0.882 0.004 302.854);
  --chart-3: oklch(0.882 0.004 302.854);
  --chart-4: oklch(0.906 0.003 302.871);
  --chart-5: oklch(0.721 0.111 300.491);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.018 303.441);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.229 0.013 302.039);
  --muted-foreground: oklch(0.701 0.022 302.451);
  --popover: oklch(0.12 0.018 303.441);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.12 0.018 303.441);
  --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.724 0.105 300.644);
  --primary-foreground: oklch(0.211 0.066 297.39);
  --secondary: oklch(0.25 0.014 302.084);
  --secondary-foreground: oklch(0.785 0.019 302.554);
  --accent: oklch(0.25 0.014 302.084);
  --accent-foreground: oklch(0.785 0.019 302.554);
  --destructive: oklch(0.67 0.185 35.154);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.724 0.105 300.644);
  --chart-1: oklch(0.724 0.105 300.644);
  --chart-2: oklch(0.25 0.014 302.084);
  --chart-3: oklch(0.25 0.014 302.084);
  --chart-4: oklch(0.28 0.016 302.038);
  --chart-5: oklch(0.721 0.111 300.491);
}