Hugger for shadcn/ui

Hugger is a shadcn/ui theme built around a deep indigo primary color (#111023) with muted light indigo accents (#c0bfd9). The light mode uses a neutral background (#f7f7fd). Dark mode keeps the deep indigo primary (#111023) on an indigo-tinted background (#05040b).

Color palette

TokenLightDark
Background
#f7f7fdghostwhite
#05040bblack
Foreground
#03020dblack
#fcfcfdwhite
Card
#f3f3fcaliceblue
#06060eblack
Card foreground
#020209black
#ffffffwhite
Popover
#f7f7fdghostwhite
#05040bblack
Popover foreground
#03020dblack
#fcfcfdwhite
Primary
#111023black
#111023black
Primary foreground
#9a97cemediumpurple
#9a97cemediumpurple
Secondary
#d8d8e4gainsboro
#222226black
Secondary foreground
#3a3851darkslategray
#b9b9c1silver
Muted
#dbdbe1gainsboro
#1e1e24black
Muted foreground
#45454adarkslategray
#b6b5basilver
Accent
#c0bfd9lightsteelblue
#333243darkslategray
Accent foreground
#272640darkslategray
#cecddalightgrey
Destructive
#632209maroon
#dd4c13chocolate
Destructive foreground
#f7bda6lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#111023black
#111023black

Contrast

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

Light mode
Text on background19.33:1AAA
Text on card18.77:1AAA
Primary button6.84:1AA
Secondary button7.97:1AAA
Muted text6.90:1AA
Accent8.12:1AAA
Destructive7.27:1AAA
Dark mode
Text on background19.88:1AAA
Text on card20.18:1AAA
Primary button6.84:1AA
Secondary button8.16:1AAA
Muted text8.11:1AAA
Accent7.98:1AAA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.008 288.565);
  --foreground: oklch(0.102 0.032 282.976);
  --muted: oklch(0.893 0.008 288.54);
  --muted-foreground: oklch(0.393 0.007 288.368);
  --popover: oklch(0.978 0.008 288.565);
  --popover-foreground: oklch(0.102 0.032 282.976);
  --card: oklch(0.967 0.011 288.489);
  --card-foreground: oklch(0.089 0.027 283.153);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.186 0.037 284.495);
  --primary-foreground: oklch(0.699 0.08 286.417);
  --secondary: oklch(0.886 0.016 288.365);
  --secondary-foreground: oklch(0.355 0.043 286.291);
  --accent: oklch(0.813 0.037 287.84);
  --accent-foreground: oklch(0.282 0.048 285.151);
  --destructive: oklch(0.347 0.1 39.605);
  --destructive-foreground: oklch(0.845 0.075 42.568);
  --ring: oklch(0.186 0.037 284.495);
  --chart-1: oklch(0.186 0.037 284.495);
  --chart-2: oklch(0.886 0.016 288.365);
  --chart-3: oklch(0.813 0.037 287.84);
  --chart-4: oklch(0.913 0.012 288.455);
  --chart-5: oklch(0.184 0.04 284.02);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.116 0.018 286.279);
  --foreground: oklch(0.992 0.001 288.692);
  --muted: oklch(0.239 0.011 287.802);
  --muted-foreground: oklch(0.776 0.006 288.565);
  --popover: oklch(0.116 0.018 286.279);
  --popover-foreground: oklch(0.992 0.001 288.692);
  --card: oklch(0.128 0.02 285.965);
  --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.186 0.037 284.495);
  --primary-foreground: oklch(0.699 0.08 286.417);
  --secondary: oklch(0.252 0.008 288.108);
  --secondary-foreground: oklch(0.788 0.011 288.444);
  --accent: oklch(0.325 0.031 286.828);
  --accent-foreground: oklch(0.853 0.018 288.315);
  --destructive: oklch(0.611 0.19 38.338);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.186 0.037 284.495);
  --chart-1: oklch(0.186 0.037 284.495);
  --chart-2: oklch(0.252 0.008 288.108);
  --chart-3: oklch(0.325 0.031 286.828);
  --chart-4: oklch(0.282 0.009 288.075);
  --chart-5: oklch(0.184 0.04 284.02);
}