Lucky for shadcn/ui

Lucky is a shadcn/ui theme built around a muted deep green primary color (#314030) with muted deep red accents (#403031). The light mode uses a neutral background (#f7fdf7). Dark mode keeps the muted deep green primary (#314030) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f7fdf7mintcream
#000000black
Foreground
#031202black
#f7f8f7whitesmoke
Card
#f7fdf7mintcream
#000000black
Card foreground
#031202black
#f7f8f7whitesmoke
Popover
#f7fdf7mintcream
#000000black
Popover foreground
#031202black
#f7f8f7whitesmoke
Primary
#314030darkslategray
#314030darkslategray
Primary foreground
#cbd8cblightgrey
#cbd8cblightgrey
Secondary
#303140darkslategray
#303140darkslategray
Secondary foreground
#cbcbd8lightgrey
#cbcbd8lightgrey
Muted
#f1f1f4whitesmoke
#0b0b0eblack
Muted foreground
#494955darkslategray
#aaaab6darkgray
Accent
#403031darkslategray
#403031darkslategray
Accent foreground
#d8cbcblightgrey
#d8cbcblightgrey
Destructive
#8b2c04saddlebrown
#f96424tomato
Destructive foreground
#fdd5c3peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#314030darkslategray
#314030darkslategray

Contrast

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

Light mode
Text on background18.65:1AAA
Text on card18.65:1AAA
Primary button7.46:1AAA
Secondary button7.96:1AAA
Muted text7.85:1AAA
Accent7.88:1AAA
Destructive6.27:1AA
Dark mode
Text on background19.72:1AAA
Text on card19.72:1AAA
Primary button7.46:1AAA
Secondary button7.96:1AAA
Muted text8.53:1AAA
Accent7.88:1AAA
Destructive6.89:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.011 144.067);
  --foreground: oklch(0.163 0.045 141.786);
  --muted: oklch(0.958 0.004 283.901);
  --muted-foreground: oklch(0.411 0.02 283.092);
  --popover: oklch(0.988 0.011 144.067);
  --popover-foreground: oklch(0.163 0.045 141.786);
  --card: oklch(0.988 0.011 144.067);
  --card-foreground: oklch(0.163 0.045 141.786);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.353 0.033 143.563);
  --primary-foreground: oklch(0.868 0.022 143.982);
  --secondary: oklch(0.319 0.027 282.419);
  --secondary-foreground: oklch(0.846 0.017 283.621);
  --accent: oklch(0.328 0.023 15.039);
  --accent-foreground: oklch(0.852 0.014 13.943);
  --destructive: oklch(0.433 0.136 38.892);
  --destructive-foreground: oklch(0.902 0.052 44.495);
  --ring: oklch(0.353 0.033 143.563);
  --chart-1: oklch(0.353 0.033 143.563);
  --chart-2: oklch(0.319 0.027 282.419);
  --chart-3: oklch(0.328 0.023 15.039);
  --chart-4: oklch(0.346 0.03 282.375);
  --chart-5: oklch(0.356 0.04 143.448);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.978 0.003 144.113);
  --muted: oklch(0.153 0.006 283.244);
  --muted-foreground: oklch(0.742 0.017 283.564);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.978 0.003 144.113);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.978 0.003 144.113);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.353 0.033 143.563);
  --primary-foreground: oklch(0.868 0.022 143.982);
  --secondary: oklch(0.319 0.027 282.419);
  --secondary-foreground: oklch(0.846 0.017 283.621);
  --accent: oklch(0.328 0.023 15.039);
  --accent-foreground: oklch(0.852 0.014 13.943);
  --destructive: oklch(0.686 0.196 40.523);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.353 0.033 143.563);
  --chart-1: oklch(0.353 0.033 143.563);
  --chart-2: oklch(0.319 0.027 282.419);
  --chart-3: oklch(0.328 0.023 15.039);
  --chart-4: oklch(0.346 0.03 282.375);
  --chart-5: oklch(0.356 0.04 143.448);
}