Grumpy for shadcn/ui

Grumpy is a shadcn/ui theme built around a purple primary color (#8e24a8) with teal accents (#24a88e). The light mode uses a neutral background (#ffffff). Dark mode keeps the purple primary (#8e24a8) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#040104black
#ffffffwhite
Card
#fcfcfcsnow
#030303black
Card foreground
#000000black
#ffffffwhite
Popover
#ffffffwhite
#000000black
Popover foreground
#040104black
#ffffffwhite
Primary
#8e24a8darkorchid
#8e24a8darkorchid
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#a88e24darkgoldenrod
#a88e24darkgoldenrod
Secondary foreground
#000000black
#000000black
Muted
#efeeeblinen
#141310black
Muted foreground
#6c695adimgray
#a5a193darkgray
Accent
#24a88elightseagreen
#24a88elightseagreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#7d2708saddlebrown
#f15d27chocolate
Destructive foreground
#fbcdbcpeachpuff
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#8e24a8darkorchid
#8e24a8darkorchid

Contrast

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

Light mode
Text on background20.76:1AAA
Text on card20.54:1AAA
Primary button7.08:1AAA
Secondary button6.55:1AA
Muted text4.77:1AA
Accent2.96:1Fail
Destructive6.73:1AA
Dark mode
Text on background21.00:1AAA
Text on card20.67:1AAA
Primary button7.08:1AAA
Secondary button6.55:1AA
Muted text7.17:1AAA
Accent2.96:1Fail
Destructive6.34:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.083 0.022 321.62);
  --muted: oklch(0.95 0.005 95.092);
  --muted-foreground: oklch(0.519 0.022 95.481);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.083 0.022 321.62);
  --card: oklch(0.992 0 161.565);
  --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.488 0.206 318.45);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.652 0.122 94.095);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.658 0.116 175.204);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.401 0.125 37.748);
  --destructive-foreground: oklch(0.883 0.057 40.951);
  --ring: oklch(0.488 0.206 318.45);
  --chart-1: oklch(0.488 0.206 318.45);
  --chart-2: oklch(0.652 0.122 94.095);
  --chart-3: oklch(0.658 0.116 175.204);
  --chart-4: oklch(0.688 0.129 94.051);
  --chart-5: oklch(0.491 0.212 318.315);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.187 0.007 95.427);
  --muted-foreground: oklch(0.708 0.021 95.355);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.092 0 180);
  --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.488 0.206 318.45);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.652 0.122 94.095);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.658 0.116 175.204);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.665 0.193 38.619);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.488 0.206 318.45);
  --chart-1: oklch(0.488 0.206 318.45);
  --chart-2: oklch(0.652 0.122 94.095);
  --chart-3: oklch(0.658 0.116 175.204);
  --chart-4: oklch(0.688 0.129 94.051);
  --chart-5: oklch(0.491 0.212 318.315);
}