Grub for shadcn/ui

Grub is a shadcn/ui theme built around a vivid deep yellow primary color (#272a04) with vivid deep indigo accents (#07042a). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid deep yellow primary (#272a04) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#131406black
#f9f9f5whitesmoke
Card
#ffffffwhite
#000000black
Card foreground
#131406black
#f9f9f5whitesmoke
Popover
#ffffffwhite
#000000black
Popover foreground
#131406black
#f9f9f5whitesmoke
Primary
#272a04black
#272a04black
Primary foreground
#d5e218gold
#d5e218gold
Secondary
#07042ablack
#07042ablack
Secondary foreground
#cfccfalavender
#cfccfalavender
Muted
#d1d0e2lightgrey
#1f1d2fdarkslategray
Muted foreground
#565658dimgray
#a8a7a9darkgray
Accent
#07042ablack
#07042ablack
Accent foreground
#cfccfalavender
#cfccfalavender
Destructive
#741601maroon
#ed2d02orangered
Destructive foreground
#feb9a9lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#272a04black
#272a04black

Contrast

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

Light mode
Text on background18.57:1AAA
Text on card18.57:1AAA
Primary button10.41:1AAA
Secondary button12.89:1AAA
Muted text4.82:1AA
Accent12.89:1AAA
Destructive6.83:1AA
Dark mode
Text on background19.89:1AAA
Text on card19.89:1AAA
Primary button10.41:1AAA
Secondary button12.89:1AAA
Muted text6.85:1AA
Accent12.89:1AAA
Destructive4.20:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.185 0.027 111.954);
  --muted: oklch(0.864 0.024 288.948);
  --muted-foreground: oklch(0.453 0.003 289.363);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.185 0.027 111.954);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.185 0.027 111.954);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.272 0.055 113.267);
  --primary-foreground: oklch(0.874 0.193 114.095);
  --secondary: oklch(0.152 0.074 277.053);
  --secondary-foreground: oklch(0.863 0.063 288.065);
  --accent: oklch(0.152 0.074 277.053);
  --accent-foreground: oklch(0.863 0.063 288.065);
  --destructive: oklch(0.366 0.131 33.664);
  --destructive-foreground: oklch(0.845 0.084 33.028);
  --ring: oklch(0.272 0.055 113.267);
  --chart-1: oklch(0.272 0.055 113.267);
  --chart-2: oklch(0.152 0.074 277.053);
  --chart-3: oklch(0.152 0.074 277.053);
  --chart-4: oklch(0.176 0.091 275.067);
  --chart-5: oklch(0.274 0.057 113.34);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.982 0.005 109.578);
  --muted: oklch(0.243 0.033 286.689);
  --muted-foreground: oklch(0.73 0.002 289.415);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.982 0.005 109.578);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.982 0.005 109.578);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.272 0.055 113.267);
  --primary-foreground: oklch(0.874 0.193 114.095);
  --secondary: oklch(0.152 0.074 277.053);
  --secondary-foreground: oklch(0.863 0.063 288.065);
  --accent: oklch(0.152 0.074 277.053);
  --accent-foreground: oklch(0.863 0.063 288.065);
  --destructive: oklch(0.611 0.229 32.291);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.272 0.055 113.267);
  --chart-1: oklch(0.272 0.055 113.267);
  --chart-2: oklch(0.152 0.074 277.053);
  --chart-3: oklch(0.152 0.074 277.053);
  --chart-4: oklch(0.176 0.091 275.067);
  --chart-5: oklch(0.274 0.057 113.34);
}