Lucky for shadcn/ui

Lucky is a shadcn/ui theme built around a green primary color (#1bc031) with red accents (#c0311b). The light mode uses a neutral background (#fbfefc). Dark mode keeps the green primary (#1bc031) on a green-tinted background (#041006).

Color palette

TokenLightDark
Background
#fbfefcwhite
#041006black
Foreground
#031705black
#f5f9f6whitesmoke
Card
#fbfefcwhite
#041006black
Card foreground
#031705black
#f5f9f6whitesmoke
Popover
#fbfefcwhite
#041006black
Popover foreground
#031705black
#f5f9f6whitesmoke
Primary
#1bc031limegreen
#1bc031limegreen
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#311bc0mediumblue
#311bc0mediumblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#e2e1eagainsboro
#16151eblack
Muted foreground
#52505edimgray
#a3a1afdarkgray
Accent
#c0311bfirebrick
#c0311bfirebrick
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#d52410firebrick
#ee301borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1bc031limegreen
#1bc031limegreen

Contrast

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

Light mode
Text on background18.28:1AAA
Text on card18.28:1AAA
Primary button2.43:1Fail
Secondary button10.22:1AAA
Muted text6.05:1AA
Accent5.67:1AA
Destructive5.12:1AA
Dark mode
Text on background18.25:1AAA
Text on card18.25:1AAA
Primary button2.43:1Fail
Secondary button10.22:1AAA
Muted text7.14:1AAA
Accent5.67:1AA
Destructive4.13:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.003 149.642);
  --foreground: oklch(0.18 0.046 146.969);
  --muted: oklch(0.913 0.013 292.272);
  --muted-foreground: oklch(0.437 0.023 291.55);
  --popover: oklch(0.993 0.003 149.642);
  --popover-foreground: oklch(0.18 0.046 146.969);
  --card: oklch(0.993 0.003 149.642);
  --card-foreground: oklch(0.18 0.046 146.969);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.703 0.22 144.051);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.401 0.231 274.362);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.534 0.183 31.66);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.562 0.213 30.501);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.703 0.22 144.051);
  --chart-1: oklch(0.703 0.22 144.051);
  --chart-2: oklch(0.401 0.231 274.362);
  --chart-3: oklch(0.534 0.183 31.66);
  --chart-4: oklch(0.42 0.243 274.182);
  --chart-5: oklch(0.712 0.225 143.913);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.157 0.03 148.041);
  --foreground: oklch(0.979 0.007 149.6);
  --muted: oklch(0.2 0.019 290.658);
  --muted-foreground: oklch(0.716 0.02 292.014);
  --popover: oklch(0.157 0.03 148.041);
  --popover-foreground: oklch(0.979 0.007 149.6);
  --card: oklch(0.157 0.03 148.041);
  --card-foreground: oklch(0.979 0.007 149.6);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.703 0.22 144.051);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.401 0.231 274.362);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.534 0.183 31.66);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.615 0.226 30.515);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.703 0.22 144.051);
  --chart-1: oklch(0.703 0.22 144.051);
  --chart-2: oklch(0.401 0.231 274.362);
  --chart-3: oklch(0.534 0.183 31.66);
  --chart-4: oklch(0.42 0.243 274.182);
  --chart-5: oklch(0.712 0.225 143.913);
}