Grimy for shadcn/ui

Grimy is a shadcn/ui theme built around a light yellow primary color (#faf9eb) with muted light yellow accents (#d0cfb4). The light mode uses a neutral background (#fdfdf7). Dark mode keeps the light yellow primary (#faf9eb) on a yellow-tinted background (#101004).

Color palette

TokenLightDark
Background
#fdfdf7snow
#101004black
Foreground
#090801black
#f9f9f5whitesmoke
Card
#fdfdf7snow
#101004black
Card foreground
#090801black
#f9f9f5whitesmoke
Popover
#fdfdf7snow
#101004black
Popover foreground
#090801black
#f9f9f5whitesmoke
Primary
#faf9eboldlace
#faf9eboldlace
Primary foreground
#3c3b10darkolivegreen
#3c3b10darkolivegreen
Secondary
#e1e0d6gainsboro
#353527darkslategray
Secondary foreground
#4c4c38darkolivegreen
#d0cfbelightgrey
Muted
#f5f5f0whitesmoke
#0f0f0ablack
Muted foreground
#61604cdimgray
#b3b29edarkgray
Accent
#d0cfb4silver
#4b4a2fdarkolivegreen
Accent foreground
#32321fdarkslategray
#e0dfcdgainsboro
Destructive
#ce2812firebrick
#ec3e27orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#faf9eboldlace
#faf9eboldlace

Contrast

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

Light mode
Text on background19.61:1AAA
Text on card19.61:1AAA
Primary button10.85:1AAA
Secondary button6.61:1AA
Muted text5.82:1AA
Accent8.22:1AAA
Destructive5.31:1AA
Dark mode
Text on background18.12:1AAA
Text on card18.12:1AAA
Primary button10.85:1AAA
Secondary button7.91:1AAA
Muted text8.93:1AAA
Accent6.69:1AA
Destructive3.96:1AA Large

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.008 104.942);
  --foreground: oklch(0.134 0.022 107.818);
  --muted: oklch(0.968 0.007 104.926);
  --muted-foreground: oklch(0.485 0.031 105.859);
  --popover: oklch(0.992 0.008 104.942);
  --popover-foreground: oklch(0.134 0.022 107.818);
  --card: oklch(0.992 0.008 104.942);
  --card-foreground: oklch(0.134 0.022 107.818);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.979 0.019 105.139);
  --primary-foreground: oklch(0.344 0.061 107.329);
  --secondary: oklch(0.905 0.014 105.074);
  --secondary-foreground: oklch(0.41 0.031 106.027);
  --accent: oklch(0.848 0.037 105.538);
  --accent-foreground: oklch(0.311 0.03 106.366);
  --destructive: oklch(0.552 0.204 30.994);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.979 0.019 105.139);
  --chart-1: oklch(0.979 0.019 105.139);
  --chart-2: oklch(0.905 0.014 105.074);
  --chart-3: oklch(0.848 0.037 105.538);
  --chart-4: oklch(0.926 0.011 105.012);
  --chart-5: oklch(0.98 0.02 105.155);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.169 0.025 107.203);
  --foreground: oklch(0.982 0.005 104.895);
  --muted: oklch(0.167 0.01 105.789);
  --muted-foreground: oklch(0.759 0.028 105.434);
  --popover: oklch(0.169 0.025 107.203);
  --popover-foreground: oklch(0.982 0.005 104.895);
  --card: oklch(0.169 0.025 107.203);
  --card-foreground: oklch(0.982 0.005 104.895);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.979 0.019 105.139);
  --primary-foreground: oklch(0.344 0.061 107.329);
  --secondary: oklch(0.324 0.024 106.017);
  --secondary-foreground: oklch(0.851 0.024 105.282);
  --accent: oklch(0.404 0.042 106.467);
  --accent-foreground: oklch(0.899 0.024 105.271);
  --destructive: oklch(0.624 0.214 30.997);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.979 0.019 105.139);
  --chart-1: oklch(0.979 0.019 105.139);
  --chart-2: oklch(0.324 0.024 106.017);
  --chart-3: oklch(0.404 0.042 106.467);
  --chart-4: oklch(0.358 0.027 106.05);
  --chart-5: oklch(0.98 0.02 105.155);
}