Generous for shadcn/ui

Generous is a shadcn/ui theme built around a light orange primary color (#f9ece6) with neutral gray accents (#dcdbdb). The light mode uses a neutral background (#fefcfb). Dark mode keeps the light orange primary (#f9ece6) on a neutral background (#040201).

Color palette

TokenLightDark
Background
#fefcfbsnow
#040201black
Foreground
#090402black
#fcf9f8snow
Card
#fefcfbsnow
#040201black
Card foreground
#090402black
#fcf9f8snow
Popover
#fefcfbsnow
#040201black
Popover foreground
#090402black
#fcf9f8snow
Primary
#f9ece6linen
#f9ece6linen
Primary foreground
#8c4321saddlebrown
#8c4321saddlebrown
Secondary
#dcdbdbgainsboro
#25201dblack
Secondary foreground
#434242darkslategray
#c2b7b2silver
Muted
#f5eeealinen
#150d0ablack
Muted foreground
#72625adimgray
#a5958drosybrown
Accent
#dcdbdbgainsboro
#25201dblack
Accent foreground
#434242darkslategray
#c2b7b2silver
Destructive
#d03501firebrick
#f93f01orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#f9ece6linen
#f9ece6linen

Contrast

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

Light mode
Text on background19.92:1AAA
Text on card19.92:1AAA
Primary button6.19:1AA
Secondary button7.25:1AAA
Muted text5.06:1AA
Accent7.25:1AAA
Destructive5.01:1AA
Dark mode
Text on background19.75:1AAA
Text on card19.75:1AAA
Primary button6.19:1AA
Secondary button8.23:1AAA
Muted text6.65:1AA
Accent8.23:1AAA
Destructive3.66:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.992 0.003 46.827);
  --foreground: oklch(0.113 0.016 57.549);
  --muted: oklch(0.953 0.009 46.752);
  --muted-foreground: oklch(0.508 0.025 46.369);
  --popover: oklch(0.992 0.003 46.827);
  --popover-foreground: oklch(0.113 0.016 57.549);
  --card: oklch(0.992 0.003 46.827);
  --card-foreground: oklch(0.113 0.016 57.549);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.952 0.016 46.669);
  --primary-foreground: oklch(0.471 0.11 43.73);
  --secondary: oklch(0.892 0.001 46.849);
  --secondary-foreground: oklch(0.38 0.001 46.814);
  --accent: oklch(0.892 0.001 46.849);
  --accent-foreground: oklch(0.38 0.001 46.814);
  --destructive: oklch(0.565 0.198 34.937);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.952 0.016 46.669);
  --chart-1: oklch(0.952 0.016 46.669);
  --chart-2: oklch(0.892 0.001 46.849);
  --chart-3: oklch(0.892 0.001 46.849);
  --chart-4: oklch(0.916 0 46.851);
  --chart-5: oklch(0.952 0.017 46.66);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.091 0.009 53.601);
  --foreground: oklch(0.984 0.003 46.824);
  --muted: oklch(0.169 0.014 46.069);
  --muted-foreground: oklch(0.681 0.023 46.505);
  --popover: oklch(0.091 0.009 53.601);
  --popover-foreground: oklch(0.984 0.003 46.824);
  --card: oklch(0.091 0.009 53.601);
  --card-foreground: oklch(0.984 0.003 46.824);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.952 0.016 46.669);
  --primary-foreground: oklch(0.471 0.11 43.73);
  --secondary: oklch(0.247 0.01 46.458);
  --secondary-foreground: oklch(0.788 0.015 46.651);
  --accent: oklch(0.247 0.01 46.458);
  --accent-foreground: oklch(0.788 0.015 46.651);
  --destructive: oklch(0.644 0.228 34.615);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.952 0.016 46.669);
  --chart-1: oklch(0.952 0.016 46.669);
  --chart-2: oklch(0.247 0.01 46.458);
  --chart-3: oklch(0.247 0.01 46.458);
  --chart-4: oklch(0.279 0.012 46.437);
  --chart-5: oklch(0.952 0.017 46.66);
}