Lucky for shadcn/ui

Lucky is a shadcn/ui theme built around an indigo primary color (#806eb9) with muted light indigo accents (#cac7d1). The light mode uses a neutral background (#f9f8fc). Dark mode keeps the indigo primary (#806eb9) on a neutral background (#040208).

Color palette

TokenLightDark
Background
#f9f8fcghostwhite
#040208black
Foreground
#000000black
#ffffffwhite
Card
#f9f8fcghostwhite
#040208black
Card foreground
#000000black
#ffffffwhite
Popover
#f9f8fcghostwhite
#040208black
Popover foreground
#000000black
#ffffffwhite
Primary
#806eb9slateblue
#806eb9slateblue
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#cac7d1lightgrey
#292829darkslategray
Secondary foreground
#312e38darkslategray
#c1c1c2silver
Muted
#d3cee4lightgrey
#201b31darkslategray
Muted foreground
#5e5775dimgray
#918aa8lightslategray
Accent
#cac7d1lightgrey
#292829darkslategray
Accent foreground
#312e38darkslategray
#c1c1c2silver
Destructive
#611605maroon
#e4340corangered
Destructive foreground
#faaf9elightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#806eb9slateblue
#806eb9slateblue

Contrast

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

Light mode
Text on background19.88:1AAA
Text on card19.88:1AAA
Primary button4.31:1AA Large
Secondary button7.99:1AAA
Muted text4.41:1AA Large
Accent7.99:1AAA
Destructive7.20:1AAA
Dark mode
Text on background20.61:1AAA
Text on card20.61:1AAA
Primary button4.31:1AA Large
Secondary button8.14:1AAA
Muted text5.06:1AA
Accent8.14:1AAA
Destructive4.39: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.981 0.005 296.996);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.861 0.031 296.432);
  --muted-foreground: oklch(0.474 0.049 295.153);
  --popover: oklch(0.981 0.005 296.996);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.005 296.996);
  --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.588 0.113 293.326);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.835 0.013 296.802);
  --secondary-foreground: oklch(0.309 0.017 296.108);
  --accent: oklch(0.835 0.013 296.802);
  --accent-foreground: oklch(0.309 0.017 296.108);
  --destructive: oklch(0.327 0.11 33.926);
  --destructive-foreground: oklch(0.821 0.092 33.113);
  --ring: oklch(0.588 0.113 293.326);
  --chart-1: oklch(0.588 0.113 293.326);
  --chart-2: oklch(0.835 0.013 296.802);
  --chart-3: oklch(0.835 0.013 296.802);
  --chart-4: oklch(0.861 0.011 296.853);
  --chart-5: oklch(0.582 0.123 292.915);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.02 296.581);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.24 0.042 293.709);
  --muted-foreground: oklch(0.649 0.046 295.793);
  --popover: oklch(0.1 0.02 296.581);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.1 0.02 296.581);
  --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.588 0.113 293.326);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.279 0.001 296.983);
  --secondary-foreground: oklch(0.812 0.002 297.041);
  --accent: oklch(0.279 0.001 296.983);
  --accent-foreground: oklch(0.812 0.002 297.041);
  --destructive: oklch(0.599 0.216 32.869);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.588 0.113 293.326);
  --chart-1: oklch(0.588 0.113 293.326);
  --chart-2: oklch(0.279 0.001 296.983);
  --chart-3: oklch(0.279 0.001 296.983);
  --chart-4: oklch(0.31 0.002 296.978);
  --chart-5: oklch(0.582 0.123 292.915);
}