Dense for shadcn/ui

Dense is a shadcn/ui theme built around a vivid yellow primary color (#afa404) with vivid green accents (#65af04). The light mode uses a neutral background (#fcfbf8). Dark mode keeps the vivid yellow primary (#afa404) on a yellow-tinted background (#0c0c03).

Color palette

TokenLightDark
Background
#fcfbf8snow
#0c0c03black
Foreground
#000000black
#fdfdfcwhite
Card
#fcfbf8snow
#0c0c03black
Card foreground
#000000black
#fdfdfcwhite
Popover
#fcfbf8snow
#0c0c03black
Popover foreground
#000000black
#fdfdfcwhite
Primary
#afa404darkgoldenrod
#afa404darkgoldenrod
Primary foreground
#000000black
#000000black
Secondary
#af4e04saddlebrown
#af4e04saddlebrown
Secondary foreground
#ffffffwhite
#ffffffwhite
Muted
#f3efedlinen
#120f0cblack
Muted foreground
#565452dimgray
#adaba9darkgray
Accent
#65af04olivedrab
#65af04olivedrab
Accent foreground
#000000black
#000000black
Destructive
#b73b06firebrick
#f97339tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#afa404darkgoldenrod
#afa404darkgoldenrod

Contrast

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

Light mode
Text on background20.34:1AAA
Text on card20.34:1AAA
Primary button8.09:1AAA
Secondary button5.37:1AA
Muted text6.60:1AA
Accent7.67:1AAA
Destructive5.76:1AA
Dark mode
Text on background19.31:1AAA
Text on card19.31:1AAA
Primary button8.09:1AAA
Secondary button5.37:1AA
Muted text8.34:1AAA
Accent7.67:1AAA
Destructive7.51:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.989 0.005 103.183);
  --foreground: oklch(0 0 0);
  --muted: oklch(0.955 0.005 60.209);
  --muted-foreground: oklch(0.447 0.003 60.178);
  --popover: oklch(0.989 0.005 103.183);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.989 0.005 103.183);
  --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.704 0.148 104.539);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.539 0.145 48.116);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.678 0.191 133.212);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.528 0.169 38.286);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.704 0.148 104.539);
  --chart-1: oklch(0.704 0.148 104.539);
  --chart-2: oklch(0.539 0.145 48.116);
  --chart-3: oklch(0.678 0.191 133.212);
  --chart-4: oklch(0.573 0.155 47.852);
  --chart-5: oklch(0.712 0.151 104.47);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.15 0.021 105.83);
  --foreground: oklch(0.993 0.001 103.117);
  --muted: oklch(0.171 0.008 59.631);
  --muted-foreground: oklch(0.741 0.003 60.227);
  --popover: oklch(0.15 0.021 105.83);
  --popover-foreground: oklch(0.993 0.001 103.117);
  --card: oklch(0.15 0.021 105.83);
  --card-foreground: oklch(0.993 0.001 103.117);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.704 0.148 104.539);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.539 0.145 48.116);
  --secondary-foreground: oklch(1 0 180);
  --accent: oklch(0.678 0.191 133.212);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.706 0.179 41.92);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.704 0.148 104.539);
  --chart-1: oklch(0.704 0.148 104.539);
  --chart-2: oklch(0.539 0.145 48.116);
  --chart-3: oklch(0.678 0.191 133.212);
  --chart-4: oklch(0.573 0.155 47.852);
  --chart-5: oklch(0.712 0.151 104.47);
}