Ham for shadcn/ui

Ham is a shadcn/ui theme built around a vivid purple primary color (#f48aef) with vivid teal accents (#8aeff4). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid purple primary (#f48aef) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#150514black
#fcf8fbsnow
Card
#fcfcfcsnow
#030303black
Card foreground
#100410black
#fdfcfdwhite
Popover
#fcfcfcsnow
#030303black
Popover foreground
#100410black
#fdfcfdwhite
Primary
#f48aefviolet
#f48aefviolet
Primary foreground
#460743indigo
#460743indigo
Secondary
#eff48akhaki
#eff48akhaki
Secondary foreground
#434607darkolivegreen
#434607darkolivegreen
Muted
#f1f1e9linen
#15160eblack
Muted foreground
#5a5b49darkolivegreen
#b5b6a4darkgray
Accent
#8aeff4lightskyblue
#8aeff4lightskyblue
Accent foreground
#074346darkslategray
#074346darkslategray
Destructive
#672804maroon
#f77022chocolate
Destructive foreground
#fcc3a1navajowhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f48aefviolet
#f48aefviolet

Contrast

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

Light mode
Text on background19.74:1AAA
Text on card19.62:1AAA
Primary button7.10:1AAA
Secondary button8.49:1AAA
Muted text6.10:1AA
Accent8.27:1AAA
Destructive7.12:1AAA
Dark mode
Text on background19.95:1AAA
Text on card20.20:1AAA
Primary button7.10:1AAA
Secondary button8.49:1AAA
Muted text8.85:1AAA
Accent8.27:1AAA
Destructive7.28:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.151 0.041 329.162);
  --muted: oklch(0.955 0.01 108.901);
  --muted-foreground: oklch(0.463 0.028 109.798);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0.138 0.036 328.975);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.138 0.036 328.975);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.781 0.177 328.937);
  --primary-foreground: oklch(0.28 0.117 330.499);
  --secondary: oklch(0.941 0.129 111.144);
  --secondary-foreground: oklch(0.379 0.08 112.693);
  --accent: oklch(0.892 0.095 199.992);
  --accent-foreground: oklch(0.349 0.056 200.524);
  --destructive: oklch(0.364 0.101 44.869);
  --destructive-foreground: oklch(0.859 0.079 51.396);
  --ring: oklch(0.781 0.177 328.937);
  --chart-1: oklch(0.781 0.177 328.937);
  --chart-2: oklch(0.941 0.129 111.144);
  --chart-3: oklch(0.892 0.095 199.992);
  --chart-4: oklch(0.948 0.116 110.875);
  --chart-5: oklch(0.782 0.183 328.995);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.005 327.088);
  --muted: oklch(0.195 0.014 110.032);
  --muted-foreground: oklch(0.772 0.025 109.3);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.992 0.003 327.063);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.003 327.063);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.781 0.177 328.937);
  --primary-foreground: oklch(0.28 0.117 330.499);
  --secondary: oklch(0.941 0.129 111.144);
  --secondary-foreground: oklch(0.379 0.08 112.693);
  --accent: oklch(0.892 0.095 199.992);
  --accent-foreground: oklch(0.349 0.056 200.524);
  --destructive: oklch(0.698 0.185 45.391);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.781 0.177 328.937);
  --chart-1: oklch(0.781 0.177 328.937);
  --chart-2: oklch(0.941 0.129 111.144);
  --chart-3: oklch(0.892 0.095 199.992);
  --chart-4: oklch(0.948 0.116 110.875);
  --chart-5: oklch(0.782 0.183 328.995);
}