Happiness for shadcn/ui

Happiness is a shadcn/ui theme built around a teal primary color (#73e7bf) with cyan accents (#73d6e7). The light mode uses a neutral background (#f8fcfb). Dark mode keeps the teal primary (#73e7bf) on a neutral background (#010403).

Color palette

TokenLightDark
Background
#f8fcfbmintcream
#010403black
Foreground
#031710black
#f6f8f8whitesmoke
Card
#f4fbf8mintcream
#020806black
Card foreground
#02120dblack
#f9fbfamintcream
Popover
#f8fcfbmintcream
#010403black
Popover foreground
#031710black
#f6f8f8whitesmoke
Primary
#73e7bfaquamarine
#73e7bfaquamarine
Primary foreground
#062319black
#062319black
Secondary
#73e785lightgreen
#73e785lightgreen
Secondary foreground
#06230ablack
#06230ablack
Muted
#e9ece9linen
#131613black
Muted foreground
#536a56dimgray
#95ac99darkseagreen
Accent
#73d6e7skyblue
#73d6e7skyblue
Accent foreground
#061f23black
#061f23black
Destructive
#c90c08firebrick
#f63531crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#73e7bfaquamarine
#73e7bfaquamarine

Contrast

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

Light mode
Text on background17.91:1AAA
Text on card18.23:1AAA
Primary button11.05:1AAA
Secondary button10.81:1AAA
Muted text4.95:1AA
Accent10.18:1AAA
Destructive5.94:1AA
Dark mode
Text on background19.31:1AAA
Text on card19.43:1AAA
Primary button11.05:1AAA
Secondary button10.81:1AAA
Muted text7.50:1AAA
Accent10.18:1AAA
Destructive3.83:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.005 173.421);
  --foreground: oklch(0.183 0.031 168.685);
  --muted: oklch(0.941 0.005 150.176);
  --muted-foreground: oklch(0.499 0.041 149.125);
  --popover: oklch(0.988 0.005 173.421);
  --popover-foreground: oklch(0.183 0.031 168.685);
  --card: oklch(0.982 0.008 173.343);
  --card-foreground: oklch(0.165 0.027 170.318);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.85 0.122 168.147);
  --primary-foreground: oklch(0.23 0.04 166.507);
  --secondary: oklch(0.838 0.172 147.029);
  --secondary-foreground: oklch(0.227 0.057 146.326);
  --accent: oklch(0.822 0.096 210.305);
  --accent-foreground: oklch(0.22 0.031 210.908);
  --destructive: oklch(0.528 0.212 29.056);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.85 0.122 168.147);
  --chart-1: oklch(0.85 0.122 168.147);
  --chart-2: oklch(0.838 0.172 147.029);
  --chart-3: oklch(0.822 0.096 210.305);
  --chart-4: oklch(0.85 0.158 147.417);
  --chart-5: oklch(0.855 0.126 167.922);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.098 0.011 173.818);
  --foreground: oklch(0.978 0.002 173.511);
  --muted: oklch(0.196 0.007 149.738);
  --muted-foreground: oklch(0.721 0.037 149.551);
  --popover: oklch(0.098 0.011 173.818);
  --popover-foreground: oklch(0.978 0.002 173.511);
  --card: oklch(0.124 0.014 173.818);
  --card-foreground: oklch(0.986 0.001 173.532);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.85 0.122 168.147);
  --primary-foreground: oklch(0.23 0.04 166.507);
  --secondary: oklch(0.838 0.172 147.029);
  --secondary-foreground: oklch(0.227 0.057 146.326);
  --accent: oklch(0.822 0.096 210.305);
  --accent-foreground: oklch(0.22 0.031 210.908);
  --destructive: oklch(0.635 0.229 27.393);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.85 0.122 168.147);
  --chart-1: oklch(0.85 0.122 168.147);
  --chart-2: oklch(0.838 0.172 147.029);
  --chart-3: oklch(0.822 0.096 210.305);
  --chart-4: oklch(0.85 0.158 147.417);
  --chart-5: oklch(0.855 0.126 167.922);
}