Ethical for shadcn/ui

Ethical is a shadcn/ui theme built around a vivid green primary color (#63fd82) with vivid red accents (#fd8263). The light mode uses a neutral background (#f7fdf8). Dark mode keeps the vivid green primary (#63fd82) on a green-tinted background (#050b06).

Color palette

TokenLightDark
Background
#f7fdf8mintcream
#050b06black
Foreground
#061409black
#ffffffwhite
Card
#f7fdf8mintcream
#050b06black
Card foreground
#061409black
#ffffffwhite
Popover
#f7fdf8mintcream
#050b06black
Popover foreground
#061409black
#ffffffwhite
Primary
#63fd82lightgreen
#63fd82lightgreen
Primary foreground
#012d0ablack
#012d0ablack
Secondary
#8263fdmediumslateblue
#8263fdmediumslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#d9d5e6gainsboro
#1c192ablack
Muted foreground
#565658dimgray
#a8a7a9darkgray
Accent
#fd8263salmon
#fd8263salmon
Accent foreground
#2d0a01black
#2d0a01black
Destructive
#ce0303red
#f10404red
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#63fd82lightgreen
#63fd82lightgreen

Contrast

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

Light mode
Text on background18.31:1AAA
Text on card18.31:1AAA
Primary button11.48:1AAA
Secondary button4.07:1AA Large
Muted text5.10:1AA
Accent7.38:1AAA
Destructive5.77:1AA
Dark mode
Text on background19.91:1AAA
Text on card19.91:1AAA
Primary button11.48:1AAA
Secondary button4.07:1AA Large
Muted text7.19:1AAA
Accent7.38:1AAA
Destructive4.40:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.009 151.863);
  --foreground: oklch(0.173 0.031 149.726);
  --muted: oklch(0.882 0.024 295.081);
  --muted-foreground: oklch(0.453 0.003 295.464);
  --popover: oklch(0.988 0.009 151.863);
  --popover-foreground: oklch(0.173 0.031 149.726);
  --card: oklch(0.988 0.009 151.863);
  --card-foreground: oklch(0.173 0.031 149.726);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.884 0.21 147.385);
  --primary-foreground: oklch(0.26 0.077 146.46);
  --secondary: oklch(0.613 0.218 287.348);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.739 0.156 35.125);
  --accent-foreground: oklch(0.204 0.062 39.561);
  --destructive: oklch(0.535 0.218 29.108);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.884 0.21 147.385);
  --chart-1: oklch(0.884 0.21 147.385);
  --chart-2: oklch(0.613 0.218 287.348);
  --chart-3: oklch(0.739 0.156 35.125);
  --chart-4: oklch(0.647 0.198 288.85);
  --chart-5: oklch(0.888 0.215 147.26);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.138 0.016 151.409);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.224 0.033 292.681);
  --muted-foreground: oklch(0.731 0.002 295.516);
  --popover: oklch(0.138 0.016 151.409);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.138 0.016 151.409);
  --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.884 0.21 147.385);
  --primary-foreground: oklch(0.26 0.077 146.46);
  --secondary: oklch(0.613 0.218 287.348);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.739 0.156 35.125);
  --accent-foreground: oklch(0.204 0.062 39.561);
  --destructive: oklch(0.603 0.246 29.13);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.884 0.21 147.385);
  --chart-1: oklch(0.884 0.21 147.385);
  --chart-2: oklch(0.613 0.218 287.348);
  --chart-3: oklch(0.739 0.156 35.125);
  --chart-4: oklch(0.647 0.198 288.85);
  --chart-5: oklch(0.888 0.215 147.26);
}