Grateful for shadcn/ui

Grateful is a shadcn/ui theme built around a vivid green primary color (#9ca90f) with vivid indigo accents (#1c0fa9). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid green primary (#9ca90f) on a green-tinted background (#0a0b04).

Color palette

TokenLightDark
Background
#ffffffwhite
#0a0b04black
Foreground
#070803black
#fbfcf8snow
Card
#ffffffwhite
#0a0b04black
Card foreground
#070803black
#fbfcf8snow
Popover
#ffffffwhite
#0a0b04black
Popover foreground
#070803black
#fbfcf8snow
Primary
#9ca90fdarkgoldenrod
#9ca90fdarkgoldenrod
Primary foreground
#000000black
#000000black
Secondary
#1c0fa9darkblue
#1c0fa9darkblue
Secondary foreground
#eeecfdlavender
#eeecfdlavender
Muted
#e5e4f1lavender
#0f0e1bblack
Muted foreground
#494856darkslategray
#aaa9b7darkgray
Accent
#1c0fa9darkblue
#1c0fa9darkblue
Accent foreground
#eeecfdlavender
#eeecfdlavender
Destructive
#822e08saddlebrown
#f4783ecoral
Destructive foreground
#fbd3c0peachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9ca90fdarkgoldenrod
#9ca90fdarkgoldenrod

Contrast

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

Light mode
Text on background20.09:1AAA
Text on card20.09:1AAA
Primary button8.09:1AAA
Secondary button10.70:1AAA
Muted text7.11:1AAA
Accent10.70:1AAA
Destructive6.45:1AA
Dark mode
Text on background19.17:1AAA
Text on card19.17:1AAA
Primary button8.09:1AAA
Secondary button10.70:1AAA
Muted text8.26:1AAA
Accent10.70:1AAA
Destructive7.58:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.129 0.016 111.61);
  --muted: oklch(0.923 0.018 289.874);
  --muted-foreground: oklch(0.408 0.024 289.127);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.129 0.016 111.61);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.129 0.016 111.61);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.7 0.156 115.149);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.35 0.218 269.631);
  --secondary-foreground: oklch(0.95 0.023 289.788);
  --accent: oklch(0.35 0.218 269.631);
  --accent-foreground: oklch(0.95 0.023 289.788);
  --destructive: oklch(0.42 0.124 40.737);
  --destructive-foreground: oklch(0.896 0.052 46.29);
  --ring: oklch(0.7 0.156 115.149);
  --chart-1: oklch(0.7 0.156 115.149);
  --chart-2: oklch(0.35 0.218 269.631);
  --chart-3: oklch(0.35 0.218 269.631);
  --chart-4: oklch(0.37 0.232 269.403);
  --chart-5: oklch(0.709 0.159 115.244);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.146 0.016 111.567);
  --foreground: oklch(0.989 0.004 110.331);
  --muted: oklch(0.171 0.028 286.895);
  --muted-foreground: oklch(0.74 0.02 289.725);
  --popover: oklch(0.146 0.016 111.567);
  --popover-foreground: oklch(0.989 0.004 110.331);
  --card: oklch(0.146 0.016 111.567);
  --card-foreground: oklch(0.989 0.004 110.331);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.7 0.156 115.149);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.35 0.218 269.631);
  --secondary-foreground: oklch(0.95 0.023 289.788);
  --accent: oklch(0.35 0.218 269.631);
  --accent-foreground: oklch(0.95 0.023 289.788);
  --destructive: oklch(0.707 0.168 43.617);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.7 0.156 115.149);
  --chart-1: oklch(0.7 0.156 115.149);
  --chart-2: oklch(0.35 0.218 269.631);
  --chart-3: oklch(0.35 0.218 269.631);
  --chart-4: oklch(0.37 0.232 269.403);
  --chart-5: oklch(0.709 0.159 115.244);
}