Happy-go-lucky for shadcn/ui

Happy-go-lucky is a shadcn/ui theme built around a purple primary color (#ae42b8) with muted light purple accents (#d5ccd6). The light mode uses a neutral background (#fdfcfd). Dark mode keeps the purple primary (#ae42b8) on a purple-tinted background (#0e060f).

Color palette

TokenLightDark
Background
#fdfcfdwhite
#0e060fblack
Foreground
#0b040cblack
#f8f6f8whitesmoke
Card
#fdfcfdwhite
#0e060fblack
Card foreground
#0b040cblack
#f8f6f8whitesmoke
Popover
#fdfcfdwhite
#0e060fblack
Popover foreground
#0b040cblack
#f8f6f8whitesmoke
Primary
#ae42b8darkorchid
#ae42b8darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#d5ccd6lightgrey
#1d1a1eblack
Secondary foreground
#3d323edarkslategray
#b9b1b9silver
Muted
#e8d7eagainsboro
#271528black
Muted foreground
#626062dimgray
#9f9d9fdarkgray
Accent
#d5ccd6lightgrey
#1d1a1eblack
Accent foreground
#3d323edarkslategray
#b9b1b9silver
Destructive
#b8440ffirebrick
#ef763ecoral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ae42b8darkorchid
#ae42b8darkorchid

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button4.91:1AA
Secondary button7.80:1AAA
Muted text4.55:1AA
Accent7.80:1AAA
Destructive5.40:1AA
Dark mode
Text on background18.59:1AAA
Text on card18.59:1AAA
Primary button4.91:1AA
Secondary button8.21:1AAA
Muted text6.37:1AA
Accent8.21:1AAA
Destructive7.33:1AAA

CSS variables

Paste this into your globals.css to use Happy-go-lucky in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.003 323.149);
  --foreground: oklch(0.124 0.026 324.557);
  --muted: oklch(0.899 0.032 323.295);
  --muted-foreground: oklch(0.491 0.004 323.17);
  --popover: oklch(0.991 0.003 323.149);
  --popover-foreground: oklch(0.124 0.026 324.557);
  --card: oklch(0.991 0.003 323.149);
  --card-foreground: oklch(0.124 0.026 324.557);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.572 0.198 324.304);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.856 0.017 323.226);
  --secondary-foreground: oklch(0.334 0.026 323.485);
  --accent: oklch(0.856 0.017 323.226);
  --accent-foreground: oklch(0.334 0.026 323.485);
  --destructive: oklch(0.541 0.16 40.6);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.572 0.198 324.304);
  --chart-1: oklch(0.572 0.198 324.304);
  --chart-2: oklch(0.856 0.017 323.226);
  --chart-3: oklch(0.856 0.017 323.226);
  --chart-4: oklch(0.88 0.014 323.208);
  --chart-5: oklch(0.575 0.208 324.317);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.139 0.025 324.088);
  --foreground: oklch(0.976 0.003 323.149);
  --muted: oklch(0.229 0.044 323.918);
  --muted-foreground: oklch(0.699 0.003 323.157);
  --popover: oklch(0.139 0.025 324.088);
  --popover-foreground: oklch(0.976 0.003 323.149);
  --card: oklch(0.139 0.025 324.088);
  --card-foreground: oklch(0.976 0.003 323.149);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.572 0.198 324.304);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.224 0.008 323.296);
  --secondary-foreground: oklch(0.769 0.015 323.226);
  --accent: oklch(0.224 0.008 323.296);
  --accent-foreground: oklch(0.769 0.015 323.226);
  --destructive: oklch(0.698 0.165 43.654);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.572 0.198 324.304);
  --chart-1: oklch(0.572 0.198 324.304);
  --chart-2: oklch(0.224 0.008 323.296);
  --chart-3: oklch(0.224 0.008 323.296);
  --chart-4: oklch(0.256 0.01 323.308);
  --chart-5: oklch(0.575 0.208 324.317);
}