Hemp for shadcn/ui

Hemp is a shadcn/ui theme built around a muted purple primary color (#a28ba0) with muted teal accents (#8ba0a2). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted purple primary (#a28ba0) on a neutral background (#040104).

Color palette

TokenLightDark
Background
#ffffffwhite
#040104black
Foreground
#080208black
#ffffffwhite
Card
#ffffffwhite
#040104black
Card foreground
#080208black
#ffffffwhite
Popover
#ffffffwhite
#040104black
Popover foreground
#080208black
#ffffffwhite
Primary
#a28ba0rosybrown
#a28ba0rosybrown
Primary foreground
#000000black
#000000black
Secondary
#a0a28bdarkseagreen
#a0a28bdarkseagreen
Secondary foreground
#000000black
#000000black
Muted
#eceddebeige
#202112black
Muted foreground
#5d5d5bdimgray
#a4a4a2darkgray
Accent
#8ba0a2darkgray
#8ba0a2darkgray
Accent foreground
#000000black
#000000black
Destructive
#d55510chocolate
#ee6820chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#a28ba0rosybrown
#a28ba0rosybrown

Contrast

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

Light mode
Text on background20.53:1AAA
Text on card20.53:1AAA
Primary button6.73:1AA
Secondary button8.04:1AAA
Muted text5.56:1AA
Accent7.67:1AAA
Destructive4.07:1AA Large
Dark mode
Text on background20.74:1AAA
Text on card20.74:1AAA
Primary button6.73:1AA
Secondary button8.04:1AAA
Muted text6.53:1AA
Accent7.67:1AAA
Destructive6.65:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.108 0.027 329.036);
  --muted: oklch(0.941 0.02 109.864);
  --muted-foreground: oklch(0.477 0.003 109.592);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.108 0.027 329.036);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.108 0.027 329.036);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.664 0.041 328.136);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.704 0.033 110.324);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.691 0.024 201.873);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.61 0.176 42.567);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.664 0.041 328.136);
  --chart-1: oklch(0.664 0.041 328.136);
  --chart-2: oklch(0.704 0.033 110.324);
  --chart-3: oklch(0.691 0.024 201.873);
  --chart-4: oklch(0.727 0.03 110.235);
  --chart-5: oklch(0.662 0.052 328.293);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.015 328.619);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.242 0.026 111.44);
  --muted-foreground: oklch(0.718 0.003 109.546);
  --popover: oklch(0.087 0.015 328.619);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.087 0.015 328.619);
  --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.664 0.041 328.136);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.704 0.033 110.324);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.691 0.024 201.873);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.674 0.183 44.053);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.664 0.041 328.136);
  --chart-1: oklch(0.664 0.041 328.136);
  --chart-2: oklch(0.704 0.033 110.324);
  --chart-3: oklch(0.691 0.024 201.873);
  --chart-4: oklch(0.727 0.03 110.235);
  --chart-5: oklch(0.662 0.052 328.293);
}