Zigzag for shadcn/ui

Zigzag is a shadcn/ui theme built around a green primary color (#548d34) with muted light green accents (#dae0d7). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#548d34) on a green-tinted background (#090e06).

Color palette

TokenLightDark
Background
#ffffffwhite
#090e06black
Foreground
#000000black
#fcfdfcwhite
Card
#ffffffwhite
#090e06black
Card foreground
#000000black
#fcfdfcwhite
Popover
#ffffffwhite
#090e06black
Popover foreground
#000000black
#fcfdfcwhite
Primary
#548d34olivedrab
#548d34olivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#eaece9linen
#2c3626darkslategray
Secondary foreground
#50564ddarkslategray
#c4d0bdsilver
Muted
#e2e5e1gainsboro
#1c1e1ablack
Muted foreground
#4e544adarkslategray
#afb5abdarkgray
Accent
#dae0d7gainsboro
#3b4f30darkslategray
Accent foreground
#404a3adarkslategray
#d6e2d0gainsboro
Destructive
#621004maroon
#f84f35tomato
Destructive foreground
#fba99dlightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#548d34olivedrab
#548d34olivedrab

Contrast

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

Light mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button3.99:1AA Large
Secondary button6.35:1AA
Muted text6.13:1AA
Accent6.89:1AA
Destructive7.03:1AAA
Dark mode
Text on background19.10:1AAA
Text on card19.10:1AAA
Primary button3.99:1AA Large
Secondary button7.91:1AAA
Muted text8.03:1AAA
Accent6.65:1AA
Destructive3.41:1AA Large

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 0 0);
  --muted: oklch(0.918 0.005 134.251);
  --muted-foreground: oklch(0.437 0.017 134.445);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(1 0 180);
  --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.585 0.136 136.233);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.941 0.004 134.242);
  --secondary-foreground: oklch(0.446 0.018 134.446);
  --accent: oklch(0.899 0.013 134.301);
  --accent-foreground: oklch(0.396 0.029 134.659);
  --destructive: oklch(0.325 0.117 32.065);
  --destructive-foreground: oklch(0.812 0.1 29.04);
  --ring: oklch(0.585 0.136 136.233);
  --chart-1: oklch(0.585 0.136 136.233);
  --chart-2: oklch(0.941 0.004 134.242);
  --chart-3: oklch(0.899 0.013 134.301);
  --chart-4: oklch(0.963 0.002 134.233);
  --chart-5: oklch(0.592 0.143 136.393);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.156 0.019 133.817);
  --foreground: oklch(0.993 0.002 134.232);
  --muted: oklch(0.23 0.007 134.396);
  --muted-foreground: oklch(0.764 0.015 134.33);
  --popover: oklch(0.156 0.019 133.817);
  --popover-foreground: oklch(0.993 0.002 134.232);
  --card: oklch(0.156 0.019 133.817);
  --card-foreground: oklch(0.993 0.002 134.232);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.585 0.136 136.233);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.317 0.03 134.801);
  --secondary-foreground: oklch(0.844 0.029 134.417);
  --accent: oklch(0.402 0.055 135.115);
  --accent-foreground: oklch(0.898 0.028 134.395);
  --destructive: oklch(0.66 0.209 31.572);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.585 0.136 136.233);
  --chart-1: oklch(0.585 0.136 136.233);
  --chart-2: oklch(0.317 0.03 134.801);
  --chart-3: oklch(0.402 0.055 135.115);
  --chart-4: oklch(0.35 0.034 134.821);
  --chart-5: oklch(0.592 0.143 136.393);
}