Hazelnut for shadcn/ui

Hazelnut is a shadcn/ui theme built around a green primary color (#5eca58) with red accents (#ca585e). The light mode uses a neutral background (#f8fdf7). Dark mode keeps the green primary (#5eca58) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#f8fdf7mintcream
#000000black
Foreground
#000000black
#f8fcf8mintcream
Card
#f4fbf3whitesmoke
#030303black
Card foreground
#000000black
#fcfdfcwhite
Popover
#f8fdf7mintcream
#000000black
Popover foreground
#000000black
#f8fcf8mintcream
Primary
#5eca58mediumseagreen
#5eca58mediumseagreen
Primary foreground
#000000black
#000000black
Secondary
#585ecaslateblue
#585ecaslateblue
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#efeff5whitesmoke
#0a0a10black
Muted foreground
#49494bdarkslategray
#b4b4b6silver
Accent
#ca585eindianred
#ca585eindianred
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#871008darkred
#e31b0dred
Destructive foreground
#fcc9c5pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5eca58mediumseagreen
#5eca58mediumseagreen

Contrast

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

Light mode
Text on background20.30:1AAA
Text on card19.97:1AAA
Primary button10.10:1AAA
Secondary button5.41:1AA
Muted text7.87:1AAA
Accent4.12:1AA Large
Destructive6.78:1AA
Dark mode
Text on background20.27:1AAA
Text on card20.28:1AAA
Primary button10.10:1AAA
Secondary button5.41:1AA
Muted text9.54:1AAA
Accent4.12:1AA Large
Destructive4.75:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.987 0.009 144.079);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.955 0.008 283.83);
  --muted-foreground: oklch(0.407 0.002 283.872);
  --popover: oklch(0.987 0.009 144.079);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.981 0.013 144.053);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.751 0.183 142.62);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.535 0.165 276.998);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.607 0.145 19.444);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.4 0.153 29.709);
  --destructive-foreground: oklch(0.879 0.058 23.073);
  --ring: oklch(0.751 0.183 142.62);
  --chart-1: oklch(0.751 0.183 142.62);
  --chart-2: oklch(0.535 0.165 276.998);
  --chart-3: oklch(0.607 0.145 19.444);
  --chart-4: oklch(0.567 0.153 278.081);
  --chart-5: oklch(0.758 0.192 142.57);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.987 0.006 144.093);
  --muted: oklch(0.147 0.013 282.357);
  --muted-foreground: oklch(0.772 0.002 283.927);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.987 0.006 144.093);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.993 0.003 144.112);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.751 0.183 142.62);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.535 0.165 276.998);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.607 0.145 19.444);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.582 0.228 29.754);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.751 0.183 142.62);
  --chart-1: oklch(0.751 0.183 142.62);
  --chart-2: oklch(0.535 0.165 276.998);
  --chart-3: oklch(0.607 0.145 19.444);
  --chart-4: oklch(0.567 0.153 278.081);
  --chart-5: oklch(0.758 0.192 142.57);
}