Hop for shadcn/ui

Hop is a shadcn/ui theme built around a deep yellow primary color (#544a12) with deep green accents (#3d5412). The light mode uses a neutral background (#fdfcf6). Dark mode keeps the deep yellow primary (#544a12) on a yellow-tinted background (#0c0b03).

Color palette

TokenLightDark
Background
#fdfcf6snow
#0c0b03black
Foreground
#040401black
#fbfbf9snow
Card
#fdfcf6snow
#0c0b03black
Card foreground
#040401black
#fbfbf9snow
Popover
#fdfcf6snow
#0c0b03black
Popover foreground
#040401black
#fbfbf9snow
Primary
#544a12darkolivegreen
#544a12darkolivegreen
Primary foreground
#ede3abpalegoldenrod
#ede3abpalegoldenrod
Secondary
#542912saddlebrown
#542912saddlebrown
Secondary foreground
#edc2abwheat
#edc2abwheat
Muted
#e5dfdcgainsboro
#231d1ablack
Muted foreground
#525151darkslategray
#aeadaddarkgray
Accent
#3d5412darkolivegreen
#3d5412darkolivegreen
Accent foreground
#d6edabpalegoldenrod
#d6edabpalegoldenrod
Destructive
#bd150ffirebrick
#ee312bcrimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#544a12darkolivegreen
#544a12darkolivegreen

Contrast

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

Light mode
Text on background20.03:1AAA
Text on card20.03:1AAA
Primary button6.86:1AA
Secondary button7.57:1AAA
Muted text5.99:1AA
Accent6.72:1AA
Destructive6.42:1AA
Dark mode
Text on background19.05:1AAA
Text on card19.05:1AAA
Primary button6.86:1AA
Secondary button7.57:1AAA
Muted text7.41:1AAA
Accent6.72:1AA
Destructive4.11:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.991 0.008 98.43);
  --foreground: oklch(0.104 0.016 102.78);
  --muted: oklch(0.907 0.008 50.54);
  --muted-foreground: oklch(0.437 0.002 50.61);
  --popover: oklch(0.991 0.008 98.43);
  --popover-foreground: oklch(0.104 0.016 102.78);
  --card: oklch(0.991 0.008 98.43);
  --card-foreground: oklch(0.104 0.016 102.78);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.407 0.074 98.962);
  --primary-foreground: oklch(0.91 0.072 99.249);
  --secondary: oklch(0.334 0.072 47.054);
  --secondary-foreground: oklch(0.846 0.058 49.853);
  --accent: oklch(0.412 0.094 127.094);
  --accent-foreground: oklch(0.912 0.089 123.803);
  --destructive: oklch(0.508 0.198 29.014);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.407 0.074 98.962);
  --chart-1: oklch(0.407 0.074 98.962);
  --chart-2: oklch(0.334 0.072 47.054);
  --chart-3: oklch(0.412 0.094 127.094);
  --chart-4: oklch(0.366 0.08 46.866);
  --chart-5: oklch(0.411 0.076 98.846);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.147 0.019 101.582);
  --foreground: oklch(0.987 0.003 98.359);
  --muted: oklch(0.237 0.012 50.06);
  --muted-foreground: oklch(0.749 0.001 50.634);
  --popover: oklch(0.147 0.019 101.582);
  --popover-foreground: oklch(0.987 0.003 98.359);
  --card: oklch(0.147 0.019 101.582);
  --card-foreground: oklch(0.987 0.003 98.359);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.407 0.074 98.962);
  --primary-foreground: oklch(0.91 0.072 99.249);
  --secondary: oklch(0.334 0.072 47.054);
  --secondary-foreground: oklch(0.846 0.058 49.853);
  --accent: oklch(0.412 0.094 127.094);
  --accent-foreground: oklch(0.912 0.089 123.803);
  --destructive: oklch(0.617 0.224 28.137);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.407 0.074 98.962);
  --chart-1: oklch(0.407 0.074 98.962);
  --chart-2: oklch(0.334 0.072 47.054);
  --chart-3: oklch(0.412 0.094 127.094);
  --chart-4: oklch(0.366 0.08 46.866);
  --chart-5: oklch(0.411 0.076 98.846);
}