Unlucky for shadcn/ui

Unlucky is a shadcn/ui theme built around a vivid deep purple primary color (#27042a) with vivid deep green accents (#062a04). The light mode uses a neutral background (#fcf8fc). Dark mode keeps the vivid deep purple primary (#27042a) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcf8fcsnow
#000000black
Foreground
#000000black
#fbf9fbsnow
Card
#fcf8fcsnow
#000000black
Card foreground
#000000black
#fbf9fbsnow
Popover
#fcf8fcsnow
#000000black
Popover foreground
#000000black
#fbf9fbsnow
Primary
#27042ablack
#27042ablack
Primary foreground
#e96ef2violet
#e96ef2violet
Secondary
#062a04black
#062a04black
Secondary foreground
#23e515limegreen
#23e515limegreen
Muted
#d2e0d1lightgrey
#202e1fdarkslategray
Muted foreground
#3f463fdarkslategray
#bac0b9silver
Accent
#062a04black
#062a04black
Accent foreground
#23e515limegreen
#23e515limegreen
Destructive
#b1160bfirebrick
#d81b0efirebrick
Destructive foreground
#fef2f1seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#27042ablack
#27042ablack

Contrast

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

Light mode
Text on background19.94:1AAA
Text on card19.94:1AAA
Primary button7.00:1AAA
Secondary button9.16:1AAA
Muted text7.10:1AAA
Accent9.16:1AAA
Destructive6.39:1AA
Dark mode
Text on background20.04:1AAA
Text on card20.04:1AAA
Primary button7.00:1AAA
Secondary button9.16:1AAA
Muted text7.73:1AAA
Accent9.16:1AAA
Destructive5.15:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.983 0.006 323.669);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.892 0.024 143.491);
  --muted-foreground: oklch(0.385 0.014 143.446);
  --popover: oklch(0.983 0.006 323.669);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.983 0.006 323.669);
  --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.201 0.082 325.207);
  --primary-foreground: oklch(0.731 0.217 324.897);
  --secondary: oklch(0.25 0.076 141.785);
  --secondary-foreground: oklch(0.801 0.265 142.209);
  --accent: oklch(0.25 0.076 141.785);
  --accent-foreground: oklch(0.801 0.265 142.209);
  --destructive: oklch(0.487 0.188 29.724);
  --destructive-foreground: oklch(0.969 0.014 22.375);
  --ring: oklch(0.201 0.082 325.207);
  --chart-1: oklch(0.201 0.082 325.207);
  --chart-2: oklch(0.25 0.076 141.785);
  --chart-3: oklch(0.25 0.076 141.785);
  --chart-4: oklch(0.298 0.092 141.956);
  --chart-5: oklch(0.202 0.084 325.236);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.984 0.003 323.653);
  --muted: oklch(0.282 0.032 143.018);
  --muted-foreground: oklch(0.801 0.011 143.56);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.984 0.003 323.653);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.984 0.003 323.653);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.201 0.082 325.207);
  --primary-foreground: oklch(0.731 0.217 324.897);
  --secondary: oklch(0.25 0.076 141.785);
  --secondary-foreground: oklch(0.801 0.265 142.209);
  --accent: oklch(0.25 0.076 141.785);
  --accent-foreground: oklch(0.801 0.265 142.209);
  --destructive: oklch(0.562 0.219 29.746);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.201 0.082 325.207);
  --chart-1: oklch(0.201 0.082 325.207);
  --chart-2: oklch(0.25 0.076 141.785);
  --chart-3: oklch(0.25 0.076 141.785);
  --chart-4: oklch(0.298 0.092 141.956);
  --chart-5: oklch(0.202 0.084 325.236);
}