Generous for shadcn/ui

Generous is a shadcn/ui theme built around a near-white primary color (#fbfcf8) with near-white accents (#f9fcf8). The light mode uses a neutral background (#fdfdfc). Dark mode keeps the near-white primary (#fbfcf8) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfdfcwhite
#000000black
Foreground
#060802black
#fdfdfcwhite
Card
#fdfdfcwhite
#000000black
Card foreground
#060802black
#fdfdfcwhite
Popover
#fdfdfcwhite
#000000black
Popover foreground
#060802black
#fdfdfcwhite
Primary
#fbfcf8snow
#fbfcf8snow
Primary foreground
#34411bdarkslategray
#34411bdarkslategray
Secondary
#fcfbf8snow
#fcfbf8snow
Secondary foreground
#413a1bdarkolivegreen
#413a1bdarkolivegreen
Muted
#eeead8antiquewhite
#272311black
Muted foreground
#46453edarkslategray
#c1bfb9silver
Accent
#f9fcf8mintcream
#f9fcf8mintcream
Accent foreground
#21411bdarkgreen
#21411bdarkgreen
Destructive
#c25414chocolate
#e26218chocolate
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fbfcf8snow
#fbfcf8snow

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button10.61:1AAA
Secondary button11.01:1AAA
Muted text7.97:1AAA
Accent11.04:1AAA
Destructive4.59:1AA
Dark mode
Text on background20.63:1AAA
Text on card20.63:1AAA
Primary button10.61:1AAA
Secondary button11.01:1AAA
Muted text8.54:1AAA
Accent11.04:1AAA
Destructive5.99:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.002 121.531);
  --foreground: oklch(0.128 0.018 121.168);
  --muted: oklch(0.935 0.024 97.586);
  --muted-foreground: oklch(0.389 0.011 97.621);
  --popover: oklch(0.994 0.002 121.531);
  --popover-foreground: oklch(0.128 0.018 121.168);
  --card: oklch(0.994 0.002 121.531);
  --card-foreground: oklch(0.128 0.018 121.168);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.989 0.006 121.585);
  --primary-foreground: oklch(0.353 0.061 124.688);
  --secondary: oklch(0.989 0.005 97.323);
  --secondary-foreground: oklch(0.349 0.049 98.259);
  --accent: oklch(0.987 0.007 140.521);
  --accent-foreground: oklch(0.339 0.073 140.365);
  --destructive: oklch(0.578 0.157 44.896);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.989 0.006 121.585);
  --chart-1: oklch(0.989 0.006 121.585);
  --chart-2: oklch(0.989 0.005 97.323);
  --chart-3: oklch(0.987 0.007 140.521);
  --chart-4: oklch(1.006 0.002 277.228);
  --chart-5: oklch(0.989 0.006 121.592);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.993 0.001 121.506);
  --muted: oklch(0.255 0.031 98.293);
  --muted-foreground: oklch(0.805 0.009 97.412);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.993 0.001 121.506);
  --card: oklch(0 0 0);
  --card-foreground: oklch(0.993 0.001 121.506);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.989 0.006 121.585);
  --primary-foreground: oklch(0.353 0.061 124.688);
  --secondary: oklch(0.989 0.005 97.323);
  --secondary-foreground: oklch(0.349 0.049 98.259);
  --accent: oklch(0.987 0.007 140.521);
  --accent-foreground: oklch(0.339 0.073 140.365);
  --destructive: oklch(0.647 0.177 44.647);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.989 0.006 121.585);
  --chart-1: oklch(0.989 0.006 121.585);
  --chart-2: oklch(0.989 0.005 97.323);
  --chart-3: oklch(0.987 0.007 140.521);
  --chart-4: oklch(1.006 0.002 277.228);
  --chart-5: oklch(0.989 0.006 121.592);
}