Squash for shadcn/ui

Squash is a shadcn/ui theme built around a green primary color (#2b9148) with purple accents (#912b74). The light mode uses a neutral background (#f8fcf9). Dark mode keeps the green primary (#2b9148) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8fcf9mintcream
#000000black
Foreground
#010903black
#fcfdfcwhite
Card
#f4faf6whitesmoke
#030303black
Card foreground
#010402black
#ffffffwhite
Popover
#f4faf6whitesmoke
#030303black
Popover foreground
#010402black
#ffffffwhite
Primary
#2b9148seagreen
#2b9148seagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#912b74purple
#912b74purple
Secondary foreground
#fbf3f9lavenderblush
#fbf3f9lavenderblush
Muted
#f2edf1whitesmoke
#120d10black
Muted foreground
#54404edarkslategray
#bfabbasilver
Accent
#912b74purple
#912b74purple
Accent foreground
#fbf3f9lavenderblush
#fbf3f9lavenderblush
Destructive
#aa320efirebrick
#d43f11chocolate
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#2b9148seagreen
#2b9148seagreen

Contrast

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

Light mode
Text on background19.46:1AAA
Text on card19.53:1AAA
Primary button3.98:1AA Large
Secondary button6.85:1AA
Muted text8.18:1AAA
Accent6.85:1AA
Destructive6.62:1AA
Dark mode
Text on background20.59:1AAA
Text on card20.67:1AAA
Primary button3.98:1AA Large
Secondary button6.85:1AA
Muted text8.95:1AAA
Accent6.85:1AA
Destructive4.64:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.006 155.081);
  --foreground: oklch(0.125 0.024 154.505);
  --muted: oklch(0.951 0.008 335.341);
  --muted-foreground: oklch(0.398 0.037 336.792);
  --popover: oklch(0.981 0.009 155.025);
  --popover-foreground: oklch(0.099 0.019 154.505);
  --card: oklch(0.981 0.009 155.025);
  --card-foreground: oklch(0.099 0.019 154.505);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.582 0.143 148.925);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.47 0.158 341.165);
  --secondary-foreground: oklch(0.973 0.012 335.409);
  --accent: oklch(0.47 0.158 341.165);
  --accent-foreground: oklch(0.973 0.012 335.409);
  --destructive: oklch(0.495 0.162 35.745);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.582 0.143 148.925);
  --chart-1: oklch(0.582 0.143 148.925);
  --chart-2: oklch(0.47 0.158 341.165);
  --chart-3: oklch(0.47 0.158 341.165);
  --chart-4: oklch(0.497 0.168 341.219);
  --chart-5: oklch(0.589 0.149 148.622);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.002 155.151);
  --muted: oklch(0.166 0.012 336.474);
  --muted-foreground: oklch(0.762 0.031 335.92);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.582 0.143 148.925);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.47 0.158 341.165);
  --secondary-foreground: oklch(0.973 0.012 335.409);
  --accent: oklch(0.47 0.158 341.165);
  --accent-foreground: oklch(0.973 0.012 335.409);
  --destructive: oklch(0.582 0.193 35.515);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.582 0.143 148.925);
  --chart-1: oklch(0.582 0.143 148.925);
  --chart-2: oklch(0.47 0.158 341.165);
  --chart-3: oklch(0.47 0.158 341.165);
  --chart-4: oklch(0.497 0.168 341.219);
  --chart-5: oklch(0.589 0.149 148.622);
}