Better for shadcn/ui

Better is a shadcn/ui theme built around a deep green primary color (#1e7411) with muted light green accents (#cedbcc). The light mode uses a neutral background (#fcfefb). Dark mode keeps the deep green primary (#1e7411) on a green-tinted background (#050b05).

Color palette

TokenLightDark
Background
#fcfefbwhite
#050b05black
Foreground
#081306black
#ffffffwhite
Card
#fcfefbwhite
#050b05black
Card foreground
#081306black
#ffffffwhite
Popover
#fcfefbwhite
#050b05black
Popover foreground
#081306black
#ffffffwhite
Primary
#1e7411forestgreen
#1e7411forestgreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#e9ede8linen
#30372fdarkslategray
Secondary foreground
#4a5b48darkslategray
#c9d0c8lightgrey
Muted
#d9e5d7gainsboro
#1c281ablack
Muted foreground
#455143darkslategray
#b0bcaedarkgray
Accent
#cedbcclightgrey
#40573ddarkslategray
Accent foreground
#334530darkslategray
#dfe8degainsboro
Destructive
#8c1a08darkred
#f2391corangered
Destructive foreground
#fcd1capink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1e7411forestgreen
#1e7411forestgreen

Contrast

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

Light mode
Text on background18.67:1AAA
Text on card18.67:1AAA
Primary button5.89:1AA
Secondary button6.15:1AA
Muted text6.41:1AA
Accent7.21:1AAA
Destructive6.68:1AA
Dark mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button5.89:1AA
Secondary button7.78:1AAA
Muted text7.77:1AAA
Accent6.29:1AA
Destructive3.91:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 141.581);
  --foreground: oklch(0.172 0.031 140.6);
  --muted: oklch(0.908 0.023 141.522);
  --muted-foreground: oklch(0.42 0.029 141.398);
  --popover: oklch(0.994 0.004 141.581);
  --popover-foreground: oklch(0.172 0.031 140.6);
  --card: oklch(0.994 0.004 141.581);
  --card-foreground: oklch(0.172 0.031 140.6);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.49 0.153 141.394);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.942 0.008 141.569);
  --secondary-foreground: oklch(0.452 0.038 141.359);
  --accent: oklch(0.878 0.026 141.51);
  --accent-foreground: oklch(0.369 0.042 141.275);
  --destructive: oklch(0.416 0.151 31.53);
  --destructive-foreground: oklch(0.895 0.05 28.32);
  --ring: oklch(0.49 0.153 141.394);
  --chart-1: oklch(0.49 0.153 141.394);
  --chart-2: oklch(0.942 0.008 141.569);
  --chart-3: oklch(0.878 0.026 141.51);
  --chart-4: oklch(0.964 0.005 141.578);
  --chart-5: oklch(0.495 0.156 141.446);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.018 140.391);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.261 0.03 141.271);
  --muted-foreground: oklch(0.782 0.025 141.502);
  --popover: oklch(0.139 0.018 140.391);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.139 0.018 140.391);
  --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.49 0.153 141.394);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.328 0.017 141.445);
  --secondary-foreground: oklch(0.85 0.014 141.548);
  --accent: oklch(0.431 0.051 141.264);
  --accent-foreground: oklch(0.922 0.016 141.542);
  --destructive: oklch(0.628 0.224 31.6);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.49 0.153 141.394);
  --chart-1: oklch(0.49 0.153 141.394);
  --chart-2: oklch(0.328 0.017 141.445);
  --chart-3: oklch(0.431 0.051 141.264);
  --chart-4: oklch(0.358 0.019 141.441);
  --chart-5: oklch(0.495 0.156 141.446);
}