Powder for shadcn/ui

Powder is a shadcn/ui theme built around a green primary color (#5b9816) with green accents (#1a9816). The light mode uses a neutral background (#fdfefb). Dark mode keeps the green primary (#5b9816) on a green-tinted background (#0b0f05).

Color palette

TokenLightDark
Background
#fdfefbwhite
#0b0f05black
Foreground
#000000black
#ffffffwhite
Card
#fafdf7mintcream
#0d1307black
Card foreground
#000000black
#ffffffwhite
Popover
#fafdf7mintcream
#0d1307black
Popover foreground
#000000black
#ffffffwhite
Primary
#5b9816olivedrab
#5b9816olivedrab
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#989316darkgoldenrod
#989316darkgoldenrod
Secondary foreground
#000000black
#000000black
Muted
#e9e8d8antiquewhite
#272716black
Muted foreground
#4c4b39darkolivegreen
#c6c5b3silver
Accent
#1a9816forestgreen
#1a9816forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7a0501maroon
#fe0a01red
Destructive foreground
#ffb1aelightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#5b9816olivedrab
#5b9816olivedrab

Contrast

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

Light mode
Text on background20.74:1AAA
Text on card20.48:1AAA
Primary button3.54:1AA Large
Secondary button6.53:1AA
Muted text7.18:1AAA
Accent3.79:1AA Large
Destructive6.58:1AA
Dark mode
Text on background19.36:1AAA
Text on card18.88:1AAA
Primary button3.54:1AA Large
Secondary button6.53:1AA
Muted text8.70:1AAA
Accent3.79:1AA Large
Destructive4.00:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.005 127.169);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.928 0.022 105.216);
  --muted-foreground: oklch(0.408 0.029 105.961);
  --popover: oklch(0.991 0.009 127.227);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.991 0.009 127.227);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.614 0.165 132.752);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.648 0.134 107.425);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.591 0.191 142.423);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.366 0.147 29.792);
  --destructive-foreground: oklch(0.832 0.092 21.42);
  --ring: oklch(0.614 0.165 132.752);
  --chart-1: oklch(0.614 0.165 132.752);
  --chart-2: oklch(0.648 0.134 107.425);
  --chart-3: oklch(0.591 0.191 142.423);
  --chart-4: oklch(0.689 0.143 107.421);
  --chart-5: oklch(0.621 0.169 132.982);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.16 0.022 127.614);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.267 0.029 106.497);
  --muted-foreground: oklch(0.82 0.025 105.319);
  --popover: oklch(0.175 0.025 128.61);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.175 0.025 128.61);
  --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.614 0.165 132.752);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.648 0.134 107.425);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.591 0.191 142.423);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.627 0.255 29.461);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.614 0.165 132.752);
  --chart-1: oklch(0.614 0.165 132.752);
  --chart-2: oklch(0.648 0.134 107.425);
  --chart-3: oklch(0.591 0.191 142.423);
  --chart-4: oklch(0.689 0.143 107.421);
  --chart-5: oklch(0.621 0.169 132.982);
}