Dense for shadcn/ui

Dense is a shadcn/ui theme built around a vivid violet primary color (#cc89f0) with vivid teal accents (#89f0cc). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid violet primary (#cc89f0) on a violet-tinted background (#0c050f).

Color palette

TokenLightDark
Background
#ffffffwhite
#0c050fblack
Foreground
#09030cblack
#faf9fbghostwhite
Card
#ffffffwhite
#0c050fblack
Card foreground
#09030cblack
#faf9fbghostwhite
Popover
#ffffffwhite
#0c050fblack
Popover foreground
#09030cblack
#faf9fbghostwhite
Primary
#cc89f0plum
#cc89f0plum
Primary foreground
#2c0840midnightblue
#2c0840midnightblue
Secondary
#f0cc89khaki
#f0cc89khaki
Secondary foreground
#402c08darkolivegreen
#402c08darkolivegreen
Muted
#ece6d9antiquewhite
#261f13black
Muted foreground
#736a59dimgray
#a69d8crosybrown
Accent
#89f0ccaquamarine
#89f0ccaquamarine
Accent foreground
#08402cdarkslategray
#08402cdarkslategray
Destructive
#c8270efirebrick
#e52c10orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cc89f0plum
#cc89f0plum

Contrast

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

Light mode
Text on background20.38:1AAA
Text on card20.38:1AAA
Primary button6.92:1AA
Secondary button8.68:1AAA
Muted text4.29:1AA Large
Accent8.67:1AAA
Destructive5.58:1AA
Dark mode
Text on background19.14:1AAA
Text on card19.14:1AAA
Primary button6.92:1AA
Secondary button8.68:1AAA
Muted text6.08:1AA
Accent8.67:1AAA
Destructive4.46:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.118 0.029 315.928);
  --muted: oklch(0.926 0.018 83.064);
  --muted-foreground: oklch(0.528 0.028 82.973);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.118 0.029 315.928);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.118 0.029 315.928);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.736 0.159 312.925);
  --primary-foreground: oklch(0.233 0.1 310.314);
  --secondary: oklch(0.862 0.094 82.338);
  --secondary-foreground: oklch(0.309 0.057 78.603);
  --accent: oklch(0.883 0.11 169.082);
  --accent-foreground: oklch(0.33 0.065 163.974);
  --destructive: oklch(0.54 0.199 31.433);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.736 0.159 312.925);
  --chart-1: oklch(0.736 0.159 312.925);
  --chart-2: oklch(0.862 0.094 82.338);
  --chart-3: oklch(0.883 0.11 169.082);
  --chart-4: oklch(0.877 0.084 82.573);
  --chart-5: oklch(0.735 0.165 312.863);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.134 0.026 314.369);
  --foreground: oklch(0.983 0.003 314.201);
  --muted: oklch(0.243 0.024 82.52);
  --muted-foreground: oklch(0.699 0.027 83.035);
  --popover: oklch(0.134 0.026 314.369);
  --popover-foreground: oklch(0.983 0.003 314.201);
  --card: oklch(0.134 0.026 314.369);
  --card-foreground: oklch(0.983 0.003 314.201);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.736 0.159 312.925);
  --primary-foreground: oklch(0.233 0.1 310.314);
  --secondary: oklch(0.862 0.094 82.338);
  --secondary-foreground: oklch(0.309 0.057 78.603);
  --accent: oklch(0.883 0.11 169.082);
  --accent-foreground: oklch(0.33 0.065 163.974);
  --destructive: oklch(0.596 0.221 31.386);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.736 0.159 312.925);
  --chart-1: oklch(0.736 0.159 312.925);
  --chart-2: oklch(0.862 0.094 82.338);
  --chart-3: oklch(0.883 0.11 169.082);
  --chart-4: oklch(0.877 0.084 82.573);
  --chart-5: oklch(0.735 0.165 312.863);
}