Grimy for shadcn/ui

Grimy is a shadcn/ui theme built around a muted blue primary color (#aebed0) with muted indigo accents (#afaed0). The light mode uses a neutral background (#fbfcfd). Dark mode keeps the muted blue primary (#aebed0) on a blue-tinted background (#070a0e).

Color palette

TokenLightDark
Background
#fbfcfdwhite
#070a0eblack
Foreground
#000000black
#fcfcfdwhite
Card
#f8fafcghostwhite
#080c11black
Card foreground
#000000black
#ffffffwhite
Popover
#fbfcfdwhite
#070a0eblack
Popover foreground
#000000black
#fcfcfdwhite
Primary
#aebed0lightsteelblue
#aebed0lightsteelblue
Primary foreground
#1c2631darkslategray
#1c2631darkslategray
Secondary
#aecfd0lightsteelblue
#aecfd0lightsteelblue
Secondary foreground
#1c3031darkslategray
#1c3031darkslategray
Muted
#eff5f6whitesmoke
#091010black
Muted foreground
#5c6161dimgray
#9ea3a3darkgray
Accent
#afaed0lightsteelblue
#afaed0lightsteelblue
Accent foreground
#1d1c31darkslategray
#1d1c31darkslategray
Destructive
#5c120amaroon
#d92a17firebrick
Destructive foreground
#f5aba3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#aebed0lightsteelblue
#aebed0lightsteelblue

Contrast

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

Light mode
Text on background20.51:1AAA
Text on card20.03:1AAA
Primary button8.08:1AAA
Secondary button8.35:1AAA
Muted text5.72:1AA
Accent7.76:1AAA
Destructive7.25:1AAA
Dark mode
Text on background19.35:1AAA
Text on card19.55:1AAA
Primary button8.08:1AAA
Secondary button8.35:1AAA
Muted text7.52:1AAA
Accent7.76:1AAA
Destructive4.89:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.002 251.465);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.966 0.007 199.51);
  --muted-foreground: oklch(0.488 0.007 199.416);
  --popover: oklch(0.992 0.002 251.465);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.984 0.004 251.481);
  --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.795 0.032 251.746);
  --primary-foreground: oklch(0.263 0.025 252.114);
  --secondary: oklch(0.832 0.035 199.064);
  --secondary-foreground: oklch(0.292 0.026 198.605);
  --accent: oklch(0.763 0.049 286.706);
  --accent-foreground: oklch(0.238 0.039 284.519);
  --destructive: oklch(0.314 0.108 30.327);
  --destructive-foreground: oklch(0.81 0.089 26.257);
  --ring: oklch(0.795 0.032 251.746);
  --chart-1: oklch(0.795 0.032 251.746);
  --chart-2: oklch(0.832 0.035 199.064);
  --chart-3: oklch(0.763 0.049 286.706);
  --chart-4: oklch(0.852 0.031 199.134);
  --chart-5: oklch(0.794 0.035 251.776);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.142 0.01 248.99);
  --foreground: oklch(0.992 0.001 251.46);
  --muted: oklch(0.166 0.01 198.865);
  --muted-foreground: oklch(0.712 0.006 199.486);
  --popover: oklch(0.142 0.01 248.99);
  --popover-foreground: oklch(0.992 0.001 251.46);
  --card: oklch(0.154 0.012 251.462);
  --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.795 0.032 251.746);
  --primary-foreground: oklch(0.263 0.025 252.114);
  --secondary: oklch(0.832 0.035 199.064);
  --secondary-foreground: oklch(0.292 0.026 198.605);
  --accent: oklch(0.763 0.049 286.706);
  --accent-foreground: oklch(0.238 0.039 284.519);
  --destructive: oklch(0.573 0.211 30.518);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.795 0.032 251.746);
  --chart-1: oklch(0.795 0.032 251.746);
  --chart-2: oklch(0.832 0.035 199.064);
  --chart-3: oklch(0.763 0.049 286.706);
  --chart-4: oklch(0.852 0.031 199.134);
  --chart-5: oklch(0.794 0.035 251.776);
}