Penalty for shadcn/ui

Penalty is a shadcn/ui theme built around a green primary color (#539047) with green accents (#47905f). The light mode uses a neutral background (#fbfefb). Dark mode keeps the green primary (#539047) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fbfefbwhite
#000000black
Foreground
#000000black
#ffffffwhite
Card
#fbfefbwhite
#000000black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfefbwhite
#000000black
Popover foreground
#000000black
#ffffffwhite
Primary
#539047seagreen
#539047seagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#779047olivedrab
#779047olivedrab
Secondary foreground
#000000black
#000000black
Muted
#e4e5e1gainsboro
#1d1e1ablack
Muted foreground
#575d4cdarkolivegreen
#aeb3a2darkgray
Accent
#47905fseagreen
#47905fseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7d1208maroon
#f13422orangered
Destructive foreground
#fbc1bclightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#539047seagreen
#539047seagreen

Contrast

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

Light mode
Text on background20.69:1AAA
Text on card20.69:1AAA
Primary button3.87:1AA Large
Secondary button5.83:1AA
Muted text5.38:1AA
Accent3.89:1AA Large
Destructive6.88:1AA
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button3.87:1AA Large
Secondary button5.83:1AA
Muted text7.80:1AAA
Accent3.89:1AA Large
Destructive4.00:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.005 140.523);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.92 0.005 121.588);
  --muted-foreground: oklch(0.467 0.027 122.449);
  --popover: oklch(0.994 0.005 140.523);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.994 0.005 140.523);
  --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.593 0.123 140.357);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.616 0.103 124.564);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.591 0.105 152.791);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.38 0.142 30.086);
  --destructive-foreground: oklch(0.862 0.067 24.51);
  --ring: oklch(0.593 0.123 140.357);
  --chart-1: oklch(0.593 0.123 140.357);
  --chart-2: oklch(0.616 0.103 124.564);
  --chart-3: oklch(0.591 0.105 152.791);
  --chart-4: oklch(0.648 0.109 124.585);
  --chart-5: oklch(0.599 0.132 140.375);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.232 0.008 122.025);
  --muted-foreground: oklch(0.758 0.024 122.013);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.593 0.123 140.357);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.616 0.103 124.564);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.591 0.105 152.791);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.623 0.226 29.933);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.593 0.123 140.357);
  --chart-1: oklch(0.593 0.123 140.357);
  --chart-2: oklch(0.616 0.103 124.564);
  --chart-3: oklch(0.591 0.105 152.791);
  --chart-4: oklch(0.648 0.109 124.585);
  --chart-5: oklch(0.599 0.132 140.375);
}