Grimy for shadcn/ui

Grimy is a shadcn/ui theme built around a vivid light violet primary color (#bf96f8) with muted light violet accents (#c2b5d4). The light mode uses a neutral background (#faf8fc). Dark mode keeps the vivid light violet primary (#bf96f8) on a neutral background (#050307).

Color palette

TokenLightDark
Background
#faf8fcghostwhite
#050307black
Foreground
#040109black
#ffffffwhite
Card
#faf8fcghostwhite
#050307black
Card foreground
#040109black
#ffffffwhite
Popover
#faf8fcghostwhite
#050307black
Popover foreground
#040109black
#ffffffwhite
Primary
#bf96f8plum
#bf96f8plum
Primary foreground
#270656midnightblue
#270656midnightblue
Secondary
#d8d2e0gainsboro
#322f37darkslategray
Secondary foreground
#3e344bdarkslategray
#cbc8d0lightgrey
Muted
#e5e1ealavender
#19151eblack
Muted foreground
#5b5760dimgray
#a29fa8darkgray
Accent
#c2b5d4silver
#463e51darkslategray
Accent foreground
#292037darkslategray
#e0dce4gainsboro
Destructive
#aa3e13brown
#e96835tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#bf96f8plum
#bf96f8plum

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 button7.16:1AAA
Secondary button7.89:1AAA
Muted text5.46:1AA
Accent7.97:1AAA
Destructive6.18:1AA
Dark mode
Text on background20.54:1AAA
Text on card20.54:1AAA
Primary button7.16:1AAA
Secondary button7.91:1AAA
Muted text6.91:1AA
Accent7.50:1AAA
Destructive6.47:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.981 0.005 304.969);
  --foreground: oklch(0.093 0.033 306.967);
  --muted: oklch(0.915 0.013 304.849);
  --muted-foreground: oklch(0.464 0.015 304.587);
  --popover: oklch(0.981 0.005 304.969);
  --popover-foreground: oklch(0.093 0.033 306.967);
  --card: oklch(0.981 0.005 304.969);
  --card-foreground: oklch(0.093 0.033 306.967);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.748 0.142 302.284);
  --primary-foreground: oklch(0.247 0.127 293.302);
  --secondary: oklch(0.872 0.02 304.733);
  --secondary-foreground: oklch(0.346 0.041 303.378);
  --accent: oklch(0.793 0.046 304.235);
  --accent-foreground: oklch(0.265 0.044 302.638);
  --destructive: oklch(0.509 0.151 39.161);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.748 0.142 302.284);
  --chart-1: oklch(0.748 0.142 302.284);
  --chart-2: oklch(0.872 0.02 304.733);
  --chart-3: oklch(0.793 0.046 304.235);
  --chart-4: oklch(0.898 0.016 304.804);
  --chart-5: oklch(0.746 0.147 302.17);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.016 305.838);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.204 0.019 303.762);
  --muted-foreground: oklch(0.707 0.014 304.774);
  --popover: oklch(0.105 0.016 305.838);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.105 0.016 305.838);
  --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.748 0.142 302.284);
  --primary-foreground: oklch(0.247 0.127 293.302);
  --secondary: oklch(0.313 0.013 304.462);
  --secondary-foreground: oklch(0.839 0.01 304.875);
  --accent: oklch(0.38 0.033 303.851);
  --accent-foreground: oklch(0.901 0.011 304.872);
  --destructive: oklch(0.667 0.172 40.668);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.748 0.142 302.284);
  --chart-1: oklch(0.748 0.142 302.284);
  --chart-2: oklch(0.313 0.013 304.462);
  --chart-3: oklch(0.38 0.033 303.851);
  --chart-4: oklch(0.342 0.015 304.444);
  --chart-5: oklch(0.746 0.147 302.17);
}