Hopeful for shadcn/ui

Hopeful is a shadcn/ui theme built around a deep yellow primary color (#0e0f06) with deep indigo accents (#06060f). The light mode uses a neutral background (#fdfdf7). Dark mode keeps the deep yellow primary (#0e0f06) on a yellow-tinted background (#0c0c03).

Color palette

TokenLightDark
Background
#fdfdf7snow
#0c0c03black
Foreground
#080802black
#fbfcf8snow
Card
#fdfdf7snow
#0c0c03black
Card foreground
#080802black
#fbfcf8snow
Popover
#fdfdf7snow
#0c0c03black
Popover foreground
#080802black
#fbfcf8snow
Primary
#0e0f06black
#0e0f06black
Primary foreground
#9ea33eyellowgreen
#9ea33eyellowgreen
Secondary
#06060fblack
#06060fblack
Secondary foreground
#c6c4e9lightsteelblue
#c6c4e9lightsteelblue
Muted
#eae9f1lavender
#0e0e16black
Muted foreground
#58585fdimgray
#a0a0a7darkgray
Accent
#06060fblack
#06060fblack
Accent foreground
#c6c4e9lightsteelblue
#c6c4e9lightsteelblue
Destructive
#a72501firebrick
#fe5425tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0e0f06black
#0e0f06black

Contrast

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

Light mode
Text on background19.64:1AAA
Text on card19.64:1AAA
Primary button7.12:1AAA
Secondary button12.00:1AAA
Muted text5.86:1AA
Accent12.00:1AAA
Destructive7.19:1AAA
Dark mode
Text on background19.04:1AAA
Text on card19.04:1AAA
Primary button7.12:1AAA
Secondary button12.00:1AAA
Muted text7.38:1AAA
Accent12.00:1AAA
Destructive6.50:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.008 108.857);
  --foreground: oklch(0.132 0.02 110.632);
  --muted: oklch(0.938 0.01 288.509);
  --muted-foreground: oklch(0.464 0.012 288.231);
  --popover: oklch(0.992 0.008 108.857);
  --popover-foreground: oklch(0.132 0.02 110.632);
  --card: oklch(0.992 0.008 108.857);
  --card-foreground: oklch(0.132 0.02 110.632);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.163 0.019 110.613);
  --primary-foreground: oklch(0.69 0.124 111.925);
  --secondary: oklch(0.126 0.022 285.679);
  --secondary-foreground: oklch(0.833 0.051 287.528);
  --accent: oklch(0.126 0.022 285.679);
  --accent-foreground: oklch(0.833 0.051 287.528);
  --destructive: oklch(0.477 0.171 34.002);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.163 0.019 110.613);
  --chart-1: oklch(0.163 0.019 110.613);
  --chart-2: oklch(0.126 0.022 285.679);
  --chart-3: oklch(0.126 0.022 285.679);
  --chart-4: oklch(0.155 0.034 284.007);
  --chart-5: oklch(0.165 0.02 110.713);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.151 0.022 110.779);
  --foreground: oklch(0.989 0.005 108.795);
  --muted: oklch(0.168 0.016 286.89);
  --muted-foreground: oklch(0.707 0.011 288.429);
  --popover: oklch(0.151 0.022 110.779);
  --popover-foreground: oklch(0.989 0.005 108.795);
  --card: oklch(0.151 0.022 110.779);
  --card-foreground: oklch(0.989 0.005 108.795);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.163 0.019 110.613);
  --primary-foreground: oklch(0.69 0.124 111.925);
  --secondary: oklch(0.126 0.022 285.679);
  --secondary-foreground: oklch(0.833 0.051 287.528);
  --accent: oklch(0.126 0.022 285.679);
  --accent-foreground: oklch(0.833 0.051 287.528);
  --destructive: oklch(0.674 0.214 35.425);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.163 0.019 110.613);
  --chart-1: oklch(0.163 0.019 110.613);
  --chart-2: oklch(0.126 0.022 285.679);
  --chart-3: oklch(0.126 0.022 285.679);
  --chart-4: oklch(0.155 0.034 284.007);
  --chart-5: oklch(0.165 0.02 110.713);
}