Dense for shadcn/ui

Dense is a shadcn/ui theme built around a green primary color (#71daa4) with pink accents (#da71a8). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#71daa4) on a neutral background (#010403).

Color palette

TokenLightDark
Background
#ffffffwhite
#010403black
Foreground
#04150cblack
#f8fcfamintcream
Card
#ffffffwhite
#010403black
Card foreground
#04150cblack
#f8fcfamintcream
Popover
#ffffffwhite
#010403black
Popover foreground
#04150cblack
#f8fcfamintcream
Primary
#71daa4mediumaquamarine
#71daa4mediumaquamarine
Primary foreground
#05140cblack
#05140cblack
Secondary
#da71a8palevioletred
#da71a8palevioletred
Secondary foreground
#14050dblack
#14050dblack
Muted
#f1eff0whitesmoke
#100e0fblack
Muted foreground
#675b61dimgray
#a4989edarkgray
Accent
#da71a8palevioletred
#da71a8palevioletred
Accent foreground
#14050dblack
#14050dblack
Destructive
#811b09maroon
#ef3e1forangered
Destructive foreground
#fbcac1pink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#71daa4mediumaquamarine
#71daa4mediumaquamarine

Contrast

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

Light mode
Text on background18.78:1AAA
Text on card18.78:1AAA
Primary button11.07:1AAA
Secondary button6.54:1AA
Muted text5.63:1AA
Accent6.54:1AA
Destructive6.85:1AA
Dark mode
Text on background19.91:1AAA
Text on card19.91:1AAA
Primary button11.07:1AAA
Secondary button6.54:1AA
Muted text6.91:1AA
Accent6.54:1AA
Destructive3.89: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.178 0.03 160.244);
  --muted: oklch(0.953 0.002 344.349);
  --muted-foreground: oklch(0.485 0.018 345.192);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.178 0.03 160.244);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.178 0.03 160.244);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.812 0.126 159.216);
  --primary-foreground: oklch(0.175 0.027 160.495);
  --secondary: oklch(0.685 0.145 349.35);
  --secondary-foreground: oklch(0.148 0.033 347.994);
  --accent: oklch(0.685 0.145 349.35);
  --accent-foreground: oklch(0.148 0.033 347.994);
  --destructive: oklch(0.395 0.139 32.189);
  --destructive-foreground: oklch(0.878 0.057 29.843);
  --ring: oklch(0.812 0.126 159.216);
  --chart-1: oklch(0.812 0.126 159.216);
  --chart-2: oklch(0.685 0.145 349.35);
  --chart-3: oklch(0.685 0.145 349.35);
  --chart-4: oklch(0.71 0.132 348.72);
  --chart-5: oklch(0.817 0.132 158.963);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.097 0.011 164.381);
  --foreground: oklch(0.987 0.004 164.173);
  --muted: oklch(0.168 0.004 344.827);
  --muted-foreground: oklch(0.692 0.016 344.87);
  --popover: oklch(0.097 0.011 164.381);
  --popover-foreground: oklch(0.987 0.004 164.173);
  --card: oklch(0.097 0.011 164.381);
  --card-foreground: oklch(0.987 0.004 164.173);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.812 0.126 159.216);
  --primary-foreground: oklch(0.175 0.027 160.495);
  --secondary: oklch(0.685 0.145 349.35);
  --secondary-foreground: oklch(0.148 0.033 347.994);
  --accent: oklch(0.685 0.145 349.35);
  --accent-foreground: oklch(0.148 0.033 347.994);
  --destructive: oklch(0.629 0.218 32.263);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.812 0.126 159.216);
  --chart-1: oklch(0.812 0.126 159.216);
  --chart-2: oklch(0.685 0.145 349.35);
  --chart-3: oklch(0.685 0.145 349.35);
  --chart-4: oklch(0.71 0.132 348.72);
  --chart-5: oklch(0.817 0.132 158.963);
}