Happy for shadcn/ui

Happy is a shadcn/ui theme built around a near-white primary color (#fbfdfe) with near-white accents (#fefcfb). The light mode uses a neutral background (#fbfdfe). Dark mode keeps the near-white primary (#fbfdfe) on a cyan-tinted background (#04090b).

Color palette

TokenLightDark
Background
#fbfdfewhite
#04090bblack
Foreground
#020b0eblack
#fcfdfdwhite
Card
#f7fbfcghostwhite
#060d0fblack
Card foreground
#010709black
#ffffffwhite
Popover
#fbfdfewhite
#04090bblack
Popover foreground
#020b0eblack
#fcfdfdwhite
Primary
#fbfdfewhite
#fbfdfewhite
Primary foreground
#14404ddarkslategray
#14404ddarkslategray
Secondary
#fefcfbsnow
#fefcfbsnow
Secondary foreground
#9e4429sienna
#9e4429sienna
Muted
#f3f2f2whitesmoke
#0d0c0cblack
Muted foreground
#504b49darkslategray
#b6b1afdarkgray
Accent
#fefcfbsnow
#fefcfbsnow
Accent foreground
#9e4429sienna
#9e4429sienna
Destructive
#b70c06firebrick
#e90f07red
Destructive foreground
#fff1f0seashell
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fbfdfewhite
#fbfdfewhite

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.51:1AAA
Primary button11.02:1AAA
Secondary button6.18:1AA
Muted text7.68:1AAA
Accent6.18:1AA
Destructive6.22:1AA
Dark mode
Text on background19.60:1AAA
Text on card19.63:1AAA
Primary button11.02:1AAA
Secondary button6.18:1AA
Muted text9.18:1AAA
Accent6.18:1AA
Destructive4.64:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.993 0.002 217.755);
  --foreground: oklch(0.139 0.019 213.677);
  --muted: oklch(0.962 0.001 37.737);
  --muted-foreground: oklch(0.416 0.007 37.671);
  --popover: oklch(0.993 0.002 217.755);
  --popover-foreground: oklch(0.139 0.019 213.677);
  --card: oklch(0.986 0.004 217.768);
  --card-foreground: oklch(0.121 0.017 211.813);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.993 0.003 217.757);
  --primary-foreground: oklch(0.347 0.052 221.638);
  --secondary: oklch(0.992 0.003 37.729);
  --secondary-foreground: oklch(0.501 0.127 37.438);
  --accent: oklch(0.992 0.003 37.729);
  --accent-foreground: oklch(0.501 0.127 37.438);
  --destructive: oklch(0.493 0.197 29.328);
  --destructive-foreground: oklch(0.968 0.015 19.826);
  --ring: oklch(0.993 0.003 217.757);
  --chart-1: oklch(0.993 0.003 217.757);
  --chart-2: oklch(0.992 0.003 37.729);
  --chart-3: oklch(0.992 0.003 37.729);
  --chart-4: oklch(1.017 0.005 217.772);
  --chart-5: oklch(0.993 0.003 217.758);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.011 214.299);
  --foreground: oklch(0.993 0 217.745);
  --muted: oklch(0.157 0.002 37.69);
  --muted-foreground: oklch(0.763 0.006 37.706);
  --popover: oklch(0.136 0.011 214.299);
  --popover-foreground: oklch(0.993 0 217.745);
  --card: oklch(0.15 0.013 216.87);
  --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.993 0.003 217.757);
  --primary-foreground: oklch(0.347 0.052 221.638);
  --secondary: oklch(0.992 0.003 37.729);
  --secondary-foreground: oklch(0.501 0.127 37.438);
  --accent: oklch(0.992 0.003 37.729);
  --accent-foreground: oklch(0.501 0.127 37.438);
  --destructive: oklch(0.589 0.237 29.323);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.993 0.003 217.757);
  --chart-1: oklch(0.993 0.003 217.757);
  --chart-2: oklch(0.992 0.003 37.729);
  --chart-3: oklch(0.992 0.003 37.729);
  --chart-4: oklch(1.017 0.005 217.772);
  --chart-5: oklch(0.993 0.003 217.758);
}