Luck is a shadcn/ui theme built around a muted deep green primary color (#232720) with muted deep violet accents (#242027). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep green primary (#232720) on a neutral background (#050703).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #050703black |
| Foreground | #091203black | #fafcf8snow |
| Card | #fcfcfcsnow | #070b04black |
| Card foreground | #070d02black | #fcfdfcwhite |
| Popover | #ffffffwhite | #050703black |
| Popover foreground | #091203black | #fafcf8snow |
| Primary | #232720black | #232720black |
| Primary foreground | #bcc3b7silver | #bcc3b7silver |
| Secondary | #242027black | #242027black |
| Secondary foreground | #bdb7c3silver | #bdb7c3silver |
| Muted | #dcd1e6gainsboro | #25192edarkslategray |
| Muted foreground | #5a545fdimgray | #a6a0abdarkgray |
| Accent | #242027black | #242027black |
| Accent foreground | #bdb7c3silver | #bdb7c3silver |
| Destructive | #910f03darkred | #eb1805red |
| Destructive foreground | #fecdc8pink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #232720black | #232720black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.10:1 | AAA |
| Text on card | 19.24:1 | AAA |
| Primary button | 8.40:1 | AAA |
| Secondary button | 8.14:1 | AAA |
| Muted text | 4.98:1 | AA |
| Accent | 8.14:1 | AAA |
| Destructive | 6.50:1 | AA |
| Text on background | 19.57:1 | AAA |
| Text on card | 19.44:1 | AAA |
| Primary button | 8.40:1 | AAA |
| Secondary button | 8.14:1 | AAA |
| Muted text | 6.54:1 | AA |
| Accent | 8.14:1 | AAA |
| Destructive | 4.50:1 | AA |
Paste this into your globals.css to use Luck in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.167 0.035 130.389);
--muted: oklch(0.876 0.031 310.113);
--muted-foreground: oklch(0.455 0.019 310.057);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.167 0.035 130.389);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.149 0.03 129.191);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.266 0.013 130.897);
--primary-foreground: oklch(0.808 0.018 130.648);
--secondary: oklch(0.252 0.013 309.961);
--secondary-foreground: oklch(0.788 0.018 310.224);
--accent: oklch(0.252 0.013 309.961);
--accent-foreground: oklch(0.788 0.018 310.224);
--destructive: oklch(0.419 0.163 30.339);
--destructive-foreground: oklch(0.889 0.057 24.316);
--ring: oklch(0.266 0.013 130.897);
--chart-1: oklch(0.266 0.013 130.897);
--chart-2: oklch(0.252 0.013 309.961);
--chart-3: oklch(0.252 0.013 309.961);
--chart-4: oklch(0.282 0.015 309.935);
--chart-5: oklch(0.269 0.017 131.048);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.124 0.015 129.412);
--foreground: oklch(0.988 0.005 130.488);
--muted: oklch(0.239 0.042 308.768);
--muted-foreground: oklch(0.715 0.017 310.221);
--popover: oklch(0.124 0.015 129.412);
--popover-foreground: oklch(0.988 0.005 130.488);
--card: oklch(0.142 0.018 129.466);
--card-foreground: oklch(0.994 0.003 130.463);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.266 0.013 130.897);
--primary-foreground: oklch(0.808 0.018 130.648);
--secondary: oklch(0.252 0.013 309.961);
--secondary-foreground: oklch(0.788 0.018 310.224);
--accent: oklch(0.252 0.013 309.961);
--accent-foreground: oklch(0.788 0.018 310.224);
--destructive: oklch(0.596 0.236 30.023);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.266 0.013 130.897);
--chart-1: oklch(0.266 0.013 130.897);
--chart-2: oklch(0.252 0.013 309.961);
--chart-3: oklch(0.252 0.013 309.961);
--chart-4: oklch(0.282 0.015 309.935);
--chart-5: oklch(0.269 0.017 131.048);
}