Legal for shadcn/ui

Legal is a shadcn/ui theme built around a green primary color (#6ed880) with red accents (#d8806e). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#6ed880) on a neutral background (#040704).

Color palette

TokenLightDark
Background
#ffffffwhite
#040704black
Foreground
#010501black
#ffffffwhite
Card
#fcfcfcsnow
#050a06black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#050a06black
Popover foreground
#000000black
#ffffffwhite
Primary
#6ed880lightgreen
#6ed880lightgreen
Primary foreground
#041006black
#041006black
Secondary
#806ed8mediumpurple
#806ed8mediumpurple
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e8e7eelavender
#121118black
Muted foreground
#414144darkslategray
#bcbbbesilver
Accent
#d8806elightcoral
#d8806elightcoral
Accent foreground
#100604black
#100604black
Destructive
#dc1e09red
#f63c28orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6ed880lightgreen
#6ed880lightgreen

Contrast

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

Light mode
Text on background20.51:1AAA
Text on card20.54:1AAA
Primary button10.94:1AAA
Secondary button4.08:1AA Large
Muted text8.29:1AAA
Accent6.88:1AA
Destructive4.94:1AA
Dark mode
Text on background20.28:1AAA
Text on card19.94:1AAA
Primary button10.94:1AAA
Secondary button4.08:1AA Large
Muted text9.82:1AAA
Accent6.88:1AA
Destructive3.74:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.099 0.023 149.421);
  --muted: oklch(0.931 0.009 293.878);
  --muted-foreground: oklch(0.377 0.004 293.843);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --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.798 0.159 147.553);
  --primary-foreground: oklch(0.158 0.029 149.195);
  --secondary: oklch(0.605 0.157 288.452);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.69 0.114 32.184);
  --accent-foreground: oklch(0.139 0.02 36.285);
  --destructive: oklch(0.572 0.222 30.394);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.798 0.159 147.553);
  --chart-1: oklch(0.798 0.159 147.553);
  --chart-2: oklch(0.605 0.157 288.452);
  --chart-3: oklch(0.69 0.114 32.184);
  --chart-4: oklch(0.637 0.143 289.343);
  --chart-5: oklch(0.804 0.166 147.397);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.119 0.011 150.285);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.182 0.014 292.576);
  --muted-foreground: oklch(0.794 0.004 293.978);
  --popover: oklch(0.137 0.013 150.285);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.137 0.013 150.285);
  --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.798 0.159 147.553);
  --primary-foreground: oklch(0.158 0.029 149.195);
  --secondary: oklch(0.605 0.157 288.452);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.69 0.114 32.184);
  --accent-foreground: oklch(0.139 0.02 36.285);
  --destructive: oklch(0.639 0.224 30.407);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.798 0.159 147.553);
  --chart-1: oklch(0.798 0.159 147.553);
  --chart-2: oklch(0.605 0.157 288.452);
  --chart-3: oklch(0.69 0.114 32.184);
  --chart-4: oklch(0.637 0.143 289.343);
  --chart-5: oklch(0.804 0.166 147.397);
}