Grubby for shadcn/ui

Grubby is a shadcn/ui theme built around a muted light yellow primary color (#e1dbcb) with muted light blue accents (#cbd1e1). The light mode uses a neutral background (#fefdfb). Dark mode keeps the muted light yellow primary (#e1dbcb) on a yellow-tinted background (#0b0905).

Color palette

TokenLightDark
Background
#fefdfbsnow
#0b0905black
Foreground
#050301black
#ffffffwhite
Card
#fcfbf7snow
#0e0c06black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfbf7snow
#0e0c06black
Popover foreground
#000000black
#ffffffwhite
Primary
#e1dbcbgainsboro
#e1dbcbgainsboro
Primary foreground
#4e442ddarkolivegreen
#4e442ddarkolivegreen
Secondary
#cbd1e1lightgrey
#cbd1e1lightgrey
Secondary foreground
#2d364edarkslategray
#2d364edarkslategray
Muted
#dcdee5gainsboro
#1a1d23black
Muted foreground
#616161dimgray
#9e9e9edarkgray
Accent
#cbd1e1lightgrey
#cbd1e1lightgrey
Accent foreground
#2d364edarkslategray
#2d364edarkslategray
Destructive
#a9440asaddlebrown
#f4813ecoral
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#e1dbcbgainsboro
#e1dbcbgainsboro

Contrast

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

Light mode
Text on background20.24:1AAA
Text on card20.30:1AAA
Primary button6.94:1AA
Secondary button7.88:1AAA
Muted text4.61:1AA
Accent7.88:1AAA
Destructive5.97:1AA
Dark mode
Text on background19.90:1AAA
Text on card19.54:1AAA
Primary button6.94:1AA
Secondary button7.88:1AAA
Muted text6.31:1AA
Accent7.88:1AAA
Destructive8.03:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.003 88.808);
  --foreground: oklch(0.102 0.017 96.025);
  --muted: oklch(0.902 0.009 268.716);
  --muted-foreground: oklch(0.492 0 180);
  --popover: oklch(0.988 0.005 88.824);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.988 0.005 88.824);
  --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.892 0.022 88.932);
  --primary-foreground: oklch(0.391 0.039 88.861);
  --secondary: oklch(0.862 0.023 268.586);
  --secondary-foreground: oklch(0.335 0.044 267.436);
  --accent: oklch(0.862 0.023 268.586);
  --accent-foreground: oklch(0.335 0.044 267.436);
  --destructive: oklch(0.516 0.146 43.78);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.892 0.022 88.932);
  --chart-1: oklch(0.892 0.022 88.932);
  --chart-2: oklch(0.862 0.023 268.586);
  --chart-3: oklch(0.862 0.023 268.586);
  --chart-4: oklch(0.888 0.018 268.635);
  --chart-5: oklch(0.894 0.025 88.944);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.14 0.012 92.726);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.229 0.013 268.285);
  --muted-foreground: oklch(0.7 0 180);
  --popover: oklch(0.155 0.014 90.588);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.155 0.014 90.588);
  --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.892 0.022 88.932);
  --primary-foreground: oklch(0.391 0.039 88.861);
  --secondary: oklch(0.862 0.023 268.586);
  --secondary-foreground: oklch(0.335 0.044 267.436);
  --accent: oklch(0.862 0.023 268.586);
  --accent-foreground: oklch(0.335 0.044 267.436);
  --destructive: oklch(0.721 0.161 48.013);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.892 0.022 88.932);
  --chart-1: oklch(0.892 0.022 88.932);
  --chart-2: oklch(0.862 0.023 268.586);
  --chart-3: oklch(0.862 0.023 268.586);
  --chart-4: oklch(0.888 0.018 268.635);
  --chart-5: oklch(0.894 0.025 88.944);
}