Intensity for shadcn/ui

Intensity is a shadcn/ui theme built around a neutral gray primary color (#635e64) with neutral gray accents (#645e62). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#635e64) on a purple-tinted background (#0d060f).

Color palette

TokenLightDark
Background
#ffffffwhite
#0d060fblack
Foreground
#0b020dblack
#fbf9fbsnow
Card
#fcfcfcsnow
#100712black
Card foreground
#070209black
#fdfcfdwhite
Popover
#ffffffwhite
#0d060fblack
Popover foreground
#0b020dblack
#fbf9fbsnow
Primary
#635e64dimgray
#635e64dimgray
Primary foreground
#fafafasnow
#fafafasnow
Secondary
#605e64dimgray
#605e64dimgray
Secondary foreground
#fafafasnow
#fafafasnow
Muted
#e8e5f1lavender
#120e1ablack
Muted foreground
#5e5d5fdimgray
#a0a0a2darkgray
Accent
#645e62dimgray
#645e62dimgray
Accent foreground
#fafafasnow
#fafafasnow
Destructive
#651706maroon
#e7350dorangered
Destructive foreground
#fab3a3lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#635e64dimgray
#635e64dimgray

Contrast

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

Light mode
Text on background20.41:1AAA
Text on card20.11:1AAA
Primary button6.07:1AA
Secondary button6.13:1AA
Muted text5.26:1AA
Accent6.06:1AA
Destructive7.15:1AAA
Dark mode
Text on background19.11:1AAA
Text on card19.31:1AAA
Primary button6.07:1AA
Secondary button6.13:1AA
Muted text7.27:1AAA
Accent6.06:1AA
Destructive4.25:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.119 0.035 321.311);
  --muted: oklch(0.927 0.016 299.742);
  --muted-foreground: oklch(0.481 0.003 299.931);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.119 0.035 321.311);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.103 0.031 321.843);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.488 0.011 319.45);
  --primary-foreground: oklch(0.985 0 319.444);
  --secondary: oklch(0.485 0.009 299.712);
  --secondary-foreground: oklch(0.985 0 300.031);
  --accent: oklch(0.489 0.01 336.239);
  --accent-foreground: oklch(0.985 0 335.876);
  --destructive: oklch(0.338 0.114 33.824);
  --destructive-foreground: oklch(0.83 0.086 33.055);
  --ring: oklch(0.488 0.011 319.45);
  --chart-1: oklch(0.488 0.011 319.45);
  --chart-2: oklch(0.485 0.009 299.712);
  --chart-3: oklch(0.489 0.01 336.239);
  --chart-4: oklch(0.512 0.01 299.709);
  --chart-5: oklch(0.484 0.022 319.456);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.024 320.02);
  --foreground: oklch(0.983 0.004 319.445);
  --muted: oklch(0.177 0.025 297.616);
  --muted-foreground: oklch(0.706 0.003 299.972);
  --popover: oklch(0.137 0.024 320.02);
  --popover-foreground: oklch(0.983 0.004 319.445);
  --card: oklch(0.149 0.028 319.632);
  --card-foreground: oklch(0.992 0.002 319.445);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.488 0.011 319.45);
  --primary-foreground: oklch(0.985 0 319.444);
  --secondary: oklch(0.485 0.009 299.712);
  --secondary-foreground: oklch(0.985 0 300.031);
  --accent: oklch(0.489 0.01 336.239);
  --accent-foreground: oklch(0.985 0 335.876);
  --destructive: oklch(0.607 0.218 32.933);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.488 0.011 319.45);
  --chart-1: oklch(0.488 0.011 319.45);
  --chart-2: oklch(0.485 0.009 299.712);
  --chart-3: oklch(0.489 0.01 336.239);
  --chart-4: oklch(0.512 0.01 299.709);
  --chart-5: oklch(0.484 0.022 319.456);
}