Alternative for shadcn/ui

Alternative is a shadcn/ui theme built around a vivid light green primary color (#e7fee8) with neutral gray accents (#dfe2df). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid light green primary (#e7fee8) on a neutral background (#020402).

Color palette

TokenLightDark
Background
#ffffffwhite
#020402black
Foreground
#010902black
#fcfdfcwhite
Card
#ffffffwhite
#020402black
Card foreground
#010902black
#fcfdfcwhite
Popover
#ffffffwhite
#020402black
Popover foreground
#010902black
#fcfdfcwhite
Primary
#e7fee8honeydew
#e7fee8honeydew
Primary foreground
#044809darkgreen
#044809darkgreen
Secondary
#dfe2dfgainsboro
#263627darkslategray
Secondary foreground
#454a45darkslategray
#bdd0bfsilver
Muted
#e2e9e3gainsboro
#161d17black
Muted foreground
#494b49darkslategray
#b4b6b4silver
Accent
#dfe2dfgainsboro
#263627darkslategray
Accent foreground
#454a45darkslategray
#bdd0bfsilver
Destructive
#970502darkred
#fc3936tomato
Destructive foreground
#fececdpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e7fee8honeydew
#e7fee8honeydew

Contrast

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

Light mode
Text on background20.16:1AAA
Text on card20.16:1AAA
Primary button10.17:1AAA
Secondary button6.92:1AA
Muted text7.10:1AAA
Accent6.92:1AA
Destructive6.39:1AA
Dark mode
Text on background20.22:1AAA
Text on card20.22:1AAA
Primary button10.17:1AAA
Secondary button7.91:1AAA
Muted text8.44:1AAA
Accent7.91:1AAA
Destructive3.63:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.124 0.029 145.768);
  --muted: oklch(0.926 0.01 147.438);
  --muted-foreground: oklch(0.41 0.003 147.474);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.124 0.029 145.768);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.124 0.029 145.768);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.974 0.037 147.166);
  --primary-foreground: oklch(0.351 0.112 143.409);
  --secondary: oklch(0.909 0.004 147.502);
  --secondary-foreground: oklch(0.403 0.012 147.259);
  --accent: oklch(0.909 0.004 147.502);
  --accent-foreground: oklch(0.403 0.012 147.259);
  --destructive: oklch(0.426 0.172 29.295);
  --destructive-foreground: oklch(0.892 0.055 19.377);
  --ring: oklch(0.974 0.037 147.166);
  --chart-1: oklch(0.974 0.037 147.166);
  --chart-2: oklch(0.909 0.004 147.502);
  --chart-3: oklch(0.909 0.004 147.502);
  --chart-4: oklch(0.932 0.003 147.514);
  --chart-5: oklch(0.974 0.038 147.153);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.013 146.583);
  --foreground: oklch(0.993 0.001 147.534);
  --muted: oklch(0.22 0.014 146.882);
  --muted-foreground: oklch(0.774 0.003 147.514);
  --popover: oklch(0.095 0.013 146.583);
  --popover-foreground: oklch(0.993 0.001 147.534);
  --card: oklch(0.095 0.013 146.583);
  --card-foreground: oklch(0.993 0.001 147.534);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.974 0.037 147.166);
  --primary-foreground: oklch(0.351 0.112 143.409);
  --secondary: oklch(0.313 0.033 146.434);
  --secondary-foreground: oklch(0.84 0.032 147.162);
  --accent: oklch(0.313 0.033 146.434);
  --accent-foreground: oklch(0.84 0.032 147.162);
  --destructive: oklch(0.648 0.23 27.179);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.974 0.037 147.166);
  --chart-1: oklch(0.974 0.037 147.166);
  --chart-2: oklch(0.313 0.033 146.434);
  --chart-3: oklch(0.313 0.033 146.434);
  --chart-4: oklch(0.345 0.038 146.396);
  --chart-5: oklch(0.974 0.038 147.153);
}