Dense for shadcn/ui

Dense is a shadcn/ui theme built around a green primary color (#9dda9a) with muted light green accents (#e3e8e3). The light mode uses a neutral background (#ffffff). Dark mode keeps the green primary (#9dda9a) on a neutral background (#020302).

Color palette

TokenLightDark
Background
#ffffffwhite
#020302black
Foreground
#010401black
#f5faf5whitesmoke
Card
#fcfcfcsnow
#040703black
Card foreground
#000000black
#f8fbf8mintcream
Popover
#ffffffwhite
#020302black
Popover foreground
#010401black
#f5faf5whitesmoke
Primary
#9dda9alightgreen
#9dda9alightgreen
Primary foreground
#133012black
#133012black
Secondary
#e3e8e3gainsboro
#111811black
Secondary foreground
#455445darkslategray
#a1baa0darkgray
Muted
#edf2edwhitesmoke
#0d120dblack
Muted foreground
#394739darkslategray
#b9c6b8silver
Accent
#e3e8e3gainsboro
#111811black
Accent foreground
#455445darkslategray
#a1baa0darkgray
Destructive
#88390csaddlebrown
#e15f14chocolate
Destructive foreground
#fbddcbbisque
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#9dda9alightgreen
#9dda9alightgreen

Contrast

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

Light mode
Text on background20.60:1AAA
Text on card20.54:1AAA
Primary button8.84:1AAA
Secondary button6.49:1AA
Muted text8.70:1AAA
Accent6.49:1AA
Destructive6.16:1AA
Dark mode
Text on background19.52:1AAA
Text on card19.45:1AAA
Primary button8.84:1AAA
Secondary button8.65:1AAA
Muted text10.66:1AAA
Accent8.65:1AAA
Destructive3.58: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.099 0.025 142.371);
  --muted: oklch(0.957 0.009 144.556);
  --muted-foreground: oklch(0.38 0.029 144.108);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.099 0.025 142.371);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.83 0.107 143.743);
  --primary-foreground: oklch(0.279 0.064 143.017);
  --secondary: oklch(0.926 0.009 144.559);
  --secondary-foreground: oklch(0.429 0.031 144.139);
  --accent: oklch(0.926 0.009 144.559);
  --accent-foreground: oklch(0.429 0.031 144.139);
  --destructive: oklch(0.447 0.12 45.102);
  --destructive-foreground: oklch(0.917 0.041 52.011);
  --ring: oklch(0.83 0.107 143.743);
  --chart-1: oklch(0.83 0.107 143.743);
  --chart-2: oklch(0.926 0.009 144.559);
  --chart-3: oklch(0.926 0.009 144.559);
  --chart-4: oklch(0.948 0.006 144.578);
  --chart-5: oklch(0.833 0.114 143.69);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.095 0.011 143.672);
  --foreground: oklch(0.979 0.008 144.567);
  --muted: oklch(0.175 0.014 144.087);
  --muted-foreground: oklch(0.813 0.024 144.423);
  --popover: oklch(0.095 0.011 143.672);
  --popover-foreground: oklch(0.979 0.008 144.567);
  --card: oklch(0.119 0.014 143.672);
  --card-foreground: oklch(0.986 0.005 144.584);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.83 0.107 143.743);
  --primary-foreground: oklch(0.279 0.064 143.017);
  --secondary: oklch(0.199 0.016 144.082);
  --secondary-foreground: oklch(0.764 0.046 144.222);
  --accent: oklch(0.199 0.016 144.082);
  --accent-foreground: oklch(0.764 0.046 144.222);
  --destructive: oklch(0.642 0.179 44.112);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.83 0.107 143.743);
  --chart-1: oklch(0.83 0.107 143.743);
  --chart-2: oklch(0.199 0.016 144.082);
  --chart-3: oklch(0.199 0.016 144.082);
  --chart-4: oklch(0.234 0.021 144.017);
  --chart-5: oklch(0.833 0.114 143.69);
}