Unfortunate for shadcn/ui

Unfortunate is a shadcn/ui theme built around a muted green primary color (#477b4c) with muted teal accents (#477b66). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted green primary (#477b4c) on a green-tinted background (#050f06).

Color palette

TokenLightDark
Background
#ffffffwhite
#050f06black
Foreground
#021204black
#fcfdfcwhite
Card
#fcfcfcsnow
#071308black
Card foreground
#020e03black
#ffffffwhite
Popover
#fcfcfcsnow
#071308black
Popover foreground
#020e03black
#ffffffwhite
Primary
#477b4cseagreen
#477b4cseagreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#5c7b47darkolivegreen
#5c7b47darkolivegreen
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#eaeee8linen
#141711black
Muted foreground
#666666dimgray
#999999darkgray
Accent
#477b66seagreen
#477b66seagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#93380bsaddlebrown
#ed5b12chocolate
Destructive foreground
#fce1d4antiquewhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#477b4cseagreen
#477b4cseagreen

Contrast

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

Light mode
Text on background19.25:1AAA
Text on card19.26:1AAA
Primary button4.99:1AA
Secondary button4.79:1AA
Muted text4.88:1AA
Accent4.88:1AA
Destructive5.98:1AA
Dark mode
Text on background19.09:1AAA
Text on card19.01:1AAA
Primary button4.99:1AA
Secondary button4.79:1AA
Muted text6.33:1AA
Accent4.88:1AA
Destructive3.43:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.162 0.04 146.384);
  --muted: oklch(0.944 0.009 132.43);
  --muted-foreground: oklch(0.51 0 171.87);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.144 0.035 146.722);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.144 0.035 146.722);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.533 0.092 146.412);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.545 0.085 133.749);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.54 0.066 166.406);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.463 0.133 42.042);
  --destructive-foreground: oklch(0.929 0.034 48.334);
  --ring: oklch(0.533 0.092 146.412);
  --chart-1: oklch(0.533 0.092 146.412);
  --chart-2: oklch(0.545 0.085 133.749);
  --chart-3: oklch(0.54 0.066 166.406);
  --chart-4: oklch(0.576 0.09 133.763);
  --chart-5: oklch(0.539 0.101 146.187);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.155 0.025 147.214);
  --foreground: oklch(0.993 0.002 148.572);
  --muted: oklch(0.2 0.013 132.874);
  --muted-foreground: oklch(0.683 0 180);
  --popover: oklch(0.17 0.029 146.836);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.17 0.029 146.836);
  --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.533 0.092 146.412);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.545 0.085 133.749);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.54 0.066 166.406);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.655 0.194 41.195);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.533 0.092 146.412);
  --chart-1: oklch(0.533 0.092 146.412);
  --chart-2: oklch(0.545 0.085 133.749);
  --chart-3: oklch(0.54 0.066 166.406);
  --chart-4: oklch(0.576 0.09 133.763);
  --chart-5: oklch(0.539 0.101 146.187);
}