Zany for shadcn/ui

Zany is a shadcn/ui theme built around a neutral gray primary color (#5e5661) with neutral gray accents (#5a6156). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#5e5661) on a neutral background (#030104).

Color palette

TokenLightDark
Background
#ffffffwhite
#030104black
Foreground
#0f0613black
#faf9fbghostwhite
Card
#ffffffwhite
#030104black
Card foreground
#0f0613black
#faf9fbghostwhite
Popover
#ffffffwhite
#030104black
Popover foreground
#0f0613black
#faf9fbghostwhite
Primary
#5e5661dimgray
#5e5661dimgray
Primary foreground
#f5f4f5whitesmoke
#f5f4f5whitesmoke
Secondary
#5a6156dimgray
#5a6156dimgray
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#daded9gainsboro
#232621black
Muted foreground
#3e443cdarkslategray
#bec3bbsilver
Accent
#5a6156dimgray
#5a6156dimgray
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#c63e15firebrick
#d04116chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5e5661dimgray
#5e5661dimgray

Contrast

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

Light mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button6.40:1AA
Secondary button6.38:1AA
Muted text7.35:1AAA
Accent6.38:1AA
Destructive5.09:1AA
Dark mode
Text on background19.80:1AAA
Text on card19.80:1AAA
Primary button6.40:1AA
Secondary button6.38:1AA
Muted text8.53:1AAA
Accent6.38:1AA
Destructive4.72:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.146 0.032 315.65);
  --muted: oklch(0.896 0.008 136.053);
  --muted-foreground: oklch(0.377 0.015 136.166);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.146 0.032 315.65);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.146 0.032 315.65);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.465 0.02 315.868);
  --primary-foreground: oklch(0.969 0.002 316.015);
  --secondary: oklch(0.483 0.02 136.175);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.483 0.02 136.175);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.558 0.18 35.955);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.465 0.02 315.868);
  --chart-1: oklch(0.465 0.02 315.868);
  --chart-2: oklch(0.483 0.02 136.175);
  --chart-3: oklch(0.483 0.02 136.175);
  --chart-4: oklch(0.511 0.021 136.176);
  --chart-5: oklch(0.461 0.03 315.79);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.083 0.02 318.069);
  --foreground: oklch(0.983 0.004 316.007);
  --muted: oklch(0.264 0.01 136.169);
  --muted-foreground: oklch(0.811 0.012 136.076);
  --popover: oklch(0.083 0.02 318.069);
  --popover-foreground: oklch(0.983 0.004 316.007);
  --card: oklch(0.083 0.02 318.069);
  --card-foreground: oklch(0.983 0.004 316.007);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.465 0.02 315.868);
  --primary-foreground: oklch(0.969 0.002 316.015);
  --secondary: oklch(0.483 0.02 136.175);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.483 0.02 136.175);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.577 0.186 35.916);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.465 0.02 315.868);
  --chart-1: oklch(0.465 0.02 315.868);
  --chart-2: oklch(0.483 0.02 136.175);
  --chart-3: oklch(0.483 0.02 136.175);
  --chart-4: oklch(0.511 0.021 136.176);
  --chart-5: oklch(0.461 0.03 315.79);
}