Gregarious for shadcn/ui

Gregarious is a shadcn/ui theme built around a light green primary color (#e4f7d9) with muted light green accents (#cad4c4). The light mode uses a neutral background (#fcfefb). Dark mode keeps the light green primary (#e4f7d9) on a neutral background (#040802).

Color palette

TokenLightDark
Background
#fcfefbwhite
#040802black
Foreground
#000000black
#f7f9f5whitesmoke
Card
#f9fcf8mintcream
#060c03black
Card foreground
#000000black
#fafbf9snow
Popover
#f9fcf8mintcream
#060c03black
Popover foreground
#000000black
#fafbf9snow
Primary
#e4f7d9beige
#e4f7d9beige
Primary foreground
#172e0ablack
#172e0ablack
Secondary
#cad4c4lightgrey
#141712black
Secondary foreground
#313b2bdarkslategray
#aab9a2darkgray
Muted
#e8f2e3beige
#121c0dblack
Muted foreground
#595b57dimgray
#a5a8a4darkgray
Accent
#cad4c4lightgrey
#141712black
Accent foreground
#313b2bdarkslategray
#aab9a2darkgray
Destructive
#8d2907saddlebrown
#da3f0borangered
Destructive foreground
#fcd6cabisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e4f7d9beige
#e4f7d9beige

Contrast

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

Light mode
Text on background20.66:1AAA
Text on card20.34:1AAA
Primary button12.98:1AAA
Secondary button7.64:1AAA
Muted text5.97:1AA
Accent7.64:1AAA
Destructive6.39:1AA
Dark mode
Text on background19.03:1AAA
Text on card19.04:1AAA
Primary button12.98:1AAA
Secondary button8.75:1AAA
Muted text7.29:1AAA
Accent8.75:1AAA
Destructive4.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 134.239);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.95 0.023 134.354);
  --muted-foreground: oklch(0.468 0.006 134.296);
  --popover: oklch(0.988 0.007 134.259);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.007 134.259);
  --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.954 0.044 134.487);
  --primary-foreground: oklch(0.273 0.067 136.426);
  --secondary: oklch(0.857 0.023 134.375);
  --secondary-foreground: oklch(0.337 0.029 134.743);
  --accent: oklch(0.857 0.023 134.375);
  --accent-foreground: oklch(0.337 0.029 134.743);
  --destructive: oklch(0.432 0.14 36.421);
  --destructive-foreground: oklch(0.906 0.046 39.283);
  --ring: oklch(0.954 0.044 134.487);
  --chart-1: oklch(0.954 0.044 134.487);
  --chart-2: oklch(0.857 0.023 134.375);
  --chart-3: oklch(0.857 0.023 134.375);
  --chart-4: oklch(0.879 0.02 134.347);
  --chart-5: oklch(0.955 0.046 134.5);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.021 132.641);
  --foreground: oklch(0.98 0.006 134.253);
  --muted: oklch(0.212 0.032 135.226);
  --muted-foreground: oklch(0.727 0.006 134.264);
  --popover: oklch(0.144 0.024 132.789);
  --popover-foreground: oklch(0.987 0.004 134.242);
  --card: oklch(0.144 0.024 132.789);
  --card-foreground: oklch(0.987 0.004 134.242);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.954 0.044 134.487);
  --primary-foreground: oklch(0.273 0.067 136.426);
  --secondary: oklch(0.2 0.013 134.587);
  --secondary-foreground: oklch(0.767 0.036 134.489);
  --accent: oklch(0.2 0.013 134.587);
  --accent-foreground: oklch(0.767 0.036 134.489);
  --destructive: oklch(0.592 0.199 35.768);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.954 0.044 134.487);
  --chart-1: oklch(0.954 0.044 134.487);
  --chart-2: oklch(0.2 0.013 134.587);
  --chart-3: oklch(0.2 0.013 134.587);
  --chart-4: oklch(0.235 0.017 134.633);
  --chart-5: oklch(0.955 0.046 134.5);
}