Hazelnut for shadcn/ui

Hazelnut is a shadcn/ui theme built around a light indigo primary color (#ecedf8) with muted light indigo accents (#bcbdcd). The light mode uses a neutral background (#fbfbfe). Dark mode keeps the light indigo primary (#ecedf8) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#fbfbfeghostwhite
#020203black
Foreground
#04040cblack
#f9f9fbghostwhite
Card
#fbfbfeghostwhite
#020203black
Card foreground
#04040cblack
#f9f9fbghostwhite
Popover
#fbfbfeghostwhite
#020203black
Popover foreground
#04040cblack
#f9f9fbghostwhite
Primary
#ecedf8lavender
#ecedf8lavender
Primary foreground
#2e3484darkslateblue
#2e3484darkslateblue
Secondary
#d2d2d5lightgrey
#28282fdarkslategray
Secondary foreground
#38393ddarkslategray
#c0c0c9silver
Muted
#d1d2e0lightgrey
#1f202edarkslategray
Muted foreground
#4e4e50darkslategray
#afafb1darkgray
Accent
#bcbdcdsilver
#333448darkslategray
Accent foreground
#252631darkslategray
#cfd0ddlightgrey
Destructive
#9c3411saddlebrown
#d34617chocolate
Destructive foreground
#fceae3linen
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#ecedf8lavender
#ecedf8lavender

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button9.29:1AAA
Secondary button7.65:1AAA
Muted text5.54:1AA
Accent8.08:1AAA
Destructive6.18:1AA
Dark mode
Text on background19.74:1AAA
Text on card19.74:1AAA
Primary button9.29:1AAA
Secondary button8.07:1AAA
Muted text7.38:1AAA
Accent7.94:1AAA
Destructive4.49:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.004 283.042);
  --foreground: oklch(0.112 0.021 277.807);
  --muted: oklch(0.868 0.02 282.715);
  --muted-foreground: oklch(0.426 0.002 283.01);
  --popover: oklch(0.989 0.004 283.042);
  --popover-foreground: oklch(0.112 0.021 277.807);
  --card: oklch(0.989 0.004 283.042);
  --card-foreground: oklch(0.112 0.021 277.807);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.949 0.015 282.829);
  --primary-foreground: oklch(0.371 0.132 274.836);
  --secondary: oklch(0.865 0.004 283.019);
  --secondary-foreground: oklch(0.344 0.008 282.726);
  --accent: oklch(0.803 0.021 282.641);
  --accent-foreground: oklch(0.273 0.021 281.706);
  --destructive: oklch(0.473 0.145 37.207);
  --destructive-foreground: oklch(0.949 0.022 39.379);
  --ring: oklch(0.949 0.015 282.829);
  --chart-1: oklch(0.949 0.015 282.829);
  --chart-2: oklch(0.865 0.004 283.019);
  --chart-3: oklch(0.803 0.021 282.641);
  --chart-4: oklch(0.889 0.004 283.037);
  --chart-5: oklch(0.948 0.016 282.811);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.084 0.009 280.407);
  --foreground: oklch(0.983 0.002 283.072);
  --muted: oklch(0.248 0.027 281.045);
  --muted-foreground: oklch(0.755 0.002 283.06);
  --popover: oklch(0.084 0.009 280.407);
  --popover-foreground: oklch(0.983 0.002 283.072);
  --card: oklch(0.084 0.009 280.407);
  --card-foreground: oklch(0.983 0.002 283.072);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.949 0.015 282.829);
  --primary-foreground: oklch(0.371 0.132 274.836);
  --secondary: oklch(0.28 0.012 282.361);
  --secondary-foreground: oklch(0.811 0.012 282.848);
  --accent: oklch(0.333 0.034 281.181);
  --accent-foreground: oklch(0.861 0.018 282.749);
  --destructive: oklch(0.589 0.185 36.907);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.949 0.015 282.829);
  --chart-1: oklch(0.949 0.015 282.829);
  --chart-2: oklch(0.28 0.012 282.361);
  --chart-3: oklch(0.333 0.034 281.181);
  --chart-4: oklch(0.31 0.014 282.33);
  --chart-5: oklch(0.948 0.016 282.811);
}