Fortunate for shadcn/ui

Fortunate is a shadcn/ui theme built around a green primary color (#6c863c) with green accents (#47863c). The light mode uses a neutral background (#fbfdf7). Dark mode keeps the green primary (#6c863c) on a neutral background (#060703).

Color palette

TokenLightDark
Background
#fbfdf7snow
#060703black
Foreground
#060901black
#fdfdfcwhite
Card
#fbfdf7snow
#060703black
Card foreground
#060901black
#fdfdfcwhite
Popover
#fbfdf7snow
#060703black
Popover foreground
#060901black
#fdfdfcwhite
Primary
#6c863colivedrab
#6c863colivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#867b3colivedrab
#867b3colivedrab
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f2f0e3linen
#1c1a0dblack
Muted foreground
#666660dimgray
#9f9e99darkgray
Accent
#47863cdarkolivegreen
#47863cdarkolivegreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#76140amaroon
#ec2d18orangered
Destructive foreground
#f9bfb8lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#6c863colivedrab
#6c863colivedrab

Contrast

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

Light mode
Text on background19.59:1AAA
Text on card19.59:1AAA
Primary button4.12:1AA Large
Secondary button4.29:1AA Large
Muted text5.05:1AA
Accent4.44:1AA Large
Destructive7.01:1AAA
Dark mode
Text on background19.84:1AAA
Text on card19.84:1AAA
Primary button4.12:1AA Large
Secondary button4.29:1AA Large
Muted text6.51:1AA
Accent4.44:1AA Large
Destructive4.22:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.009 122.359);
  --foreground: oklch(0.133 0.027 121.636);
  --muted: oklch(0.953 0.018 98.572);
  --muted-foreground: oklch(0.508 0.008 98.534);
  --popover: oklch(0.991 0.009 122.359);
  --popover-foreground: oklch(0.133 0.027 121.636);
  --card: oklch(0.991 0.009 122.359);
  --card-foreground: oklch(0.133 0.027 121.636);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.582 0.105 125.537);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.578 0.084 99.479);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.559 0.125 140.736);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.368 0.133 30.494);
  --destructive-foreground: oklch(0.855 0.068 25.843);
  --ring: oklch(0.582 0.105 125.537);
  --chart-1: oklch(0.582 0.105 125.537);
  --chart-2: oklch(0.578 0.084 99.479);
  --chart-3: oklch(0.559 0.125 140.736);
  --chart-4: oklch(0.61 0.09 99.476);
  --chart-5: oklch(0.589 0.112 125.779);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.125 0.014 121.884);
  --foreground: oklch(0.994 0.003 122.253);
  --muted: oklch(0.216 0.024 99.456);
  --muted-foreground: oklch(0.697 0.007 98.465);
  --popover: oklch(0.125 0.014 121.884);
  --popover-foreground: oklch(0.994 0.003 122.253);
  --card: oklch(0.125 0.014 121.884);
  --card-foreground: oklch(0.994 0.003 122.253);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.582 0.105 125.537);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.578 0.084 99.479);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.559 0.125 140.736);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.61 0.227 30.52);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.582 0.105 125.537);
  --chart-1: oklch(0.582 0.105 125.537);
  --chart-2: oklch(0.578 0.084 99.479);
  --chart-3: oklch(0.559 0.125 140.736);
  --chart-4: oklch(0.61 0.09 99.476);
  --chart-5: oklch(0.589 0.112 125.779);
}