Widow for shadcn/ui

Widow is a shadcn/ui theme built around a neutral gray primary color (#7e8c7d) with neutral gray accents (#7d8c84). The light mode uses a neutral background (#f7fdf7). Dark mode keeps the neutral gray primary (#7e8c7d) on a green-tinted background (#050a05).

Color palette

TokenLightDark
Background
#f7fdf7mintcream
#050a05black
Foreground
#020802black
#fcfdfcwhite
Card
#f3fcf2honeydew
#070d07black
Card foreground
#010401black
#ffffffwhite
Popover
#f7fdf7mintcream
#050a05black
Popover foreground
#020802black
#fcfdfcwhite
Primary
#7e8c7dgray
#7e8c7dgray
Primary foreground
#000000black
#000000black
Secondary
#858c7dgray
#858c7dgray
Secondary foreground
#000000black
#000000black
Muted
#e6ecdfbeige
#1a2013black
Muted foreground
#61655ddimgray
#9ea29adarkgray
Accent
#7d8c84gray
#7d8c84gray
Accent foreground
#000000black
#000000black
Destructive
#640707maroon
#f03d3dtomato
Destructive foreground
#f8a5a5lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7e8c7dgray
#7e8c7dgray

Contrast

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

Light mode
Text on background19.61:1AAA
Text on card19.67:1AAA
Primary button5.92:1AA
Secondary button6.04:1AA
Muted text4.93:1AA
Accent5.95:1AA
Destructive6.93:1AA
Dark mode
Text on background19.55:1AAA
Text on card19.58:1AAA
Primary button5.92:1AA
Secondary button6.04:1AA
Muted text6.43:1AA
Accent5.95:1AA
Destructive3.85:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.988 0.011 145.022);
  --foreground: oklch(0.123 0.028 143.124);
  --muted: oklch(0.935 0.018 128.019);
  --muted-foreground: oklch(0.5 0.013 128.095);
  --popover: oklch(0.988 0.011 145.022);
  --popover-foreground: oklch(0.123 0.028 143.124);
  --card: oklch(0.982 0.017 144.981);
  --card-foreground: oklch(0.098 0.022 143.124);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.624 0.027 144.787);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.63 0.023 128.225);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.626 0.02 163.418);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.321 0.123 27.9);
  --destructive-foreground: oklch(0.803 0.099 19.47);
  --ring: oklch(0.624 0.027 144.787);
  --chart-1: oklch(0.624 0.027 144.787);
  --chart-2: oklch(0.63 0.023 128.225);
  --chart-3: oklch(0.626 0.02 163.418);
  --chart-4: oklch(0.654 0.021 128.178);
  --chart-5: oklch(0.629 0.041 144.631);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.137 0.016 144.164);
  --foreground: oklch(0.993 0.002 145.088);
  --muted: oklch(0.232 0.025 129.156);
  --muted-foreground: oklch(0.707 0.012 127.987);
  --popover: oklch(0.137 0.016 144.164);
  --popover-foreground: oklch(0.993 0.002 145.088);
  --card: oklch(0.151 0.018 144.155);
  --card-foreground: oklch(1 0 180);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.624 0.027 144.787);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.63 0.023 128.225);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.626 0.02 163.418);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.632 0.216 25.967);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.624 0.027 144.787);
  --chart-1: oklch(0.624 0.027 144.787);
  --chart-2: oklch(0.63 0.023 128.225);
  --chart-3: oklch(0.626 0.02 163.418);
  --chart-4: oklch(0.654 0.021 128.178);
  --chart-5: oklch(0.629 0.041 144.631);
}