Widow for shadcn/ui

Widow is a shadcn/ui theme built around an indigo primary color (#32229b) with green accents (#229b32). The light mode uses a neutral background (#fcfbfe). Dark mode keeps the indigo primary (#32229b) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fcfbfewhite
#000000black
Foreground
#05040cblack
#f6f5f9whitesmoke
Card
#f8f7fcghostwhite
#030303black
Card foreground
#030208black
#f9f8fbghostwhite
Popover
#f8f7fcghostwhite
#030303black
Popover foreground
#030208black
#f9f8fbghostwhite
Primary
#32229bdarkslateblue
#32229bdarkslateblue
Primary foreground
#f4f2fcwhitesmoke
#f4f2fcwhitesmoke
Secondary
#9b3222brown
#9b3222brown
Secondary foreground
#fcf4f2seashell
#fcf4f2seashell
Muted
#e0d8d7gainsboro
#28211fblack
Muted foreground
#615856dimgray
#a99f9edarkgray
Accent
#229b32forestgreen
#229b32forestgreen
Accent foreground
#ffffffwhite
#ffffffwhite
Destructive
#91160ddarkred
#ed4b40tomato
Destructive foreground
#fbd8d5mistyrose
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#32229bdarkslateblue
#32229bdarkslateblue

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.43:1AAA
Primary button10.32:1AAA
Secondary button6.74:1AA
Muted text4.92:1AA
Accent3.63:1AA Large
Destructive6.84:1AA
Dark mode
Text on background19.34:1AAA
Text on card19.54:1AAA
Primary button10.32:1AAA
Secondary button6.74:1AA
Muted text6.15:1AA
Accent3.63:1AA Large
Destructive3.68: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.99 0.003 292.479);
  --foreground: oklch(0.112 0.023 290.472);
  --muted: oklch(0.888 0.008 27.981);
  --muted-foreground: oklch(0.468 0.013 28.092);
  --popover: oklch(0.979 0.007 292.413);
  --popover-foreground: oklch(0.097 0.02 290.575);
  --card: oklch(0.979 0.007 292.413);
  --card-foreground: oklch(0.097 0.02 290.575);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.366 0.183 278.394);
  --primary-foreground: oklch(0.966 0.013 292.288);
  --secondary: oklch(0.47 0.143 31.461);
  --secondary-foreground: oklch(0.973 0.009 27.982);
  --accent: oklch(0.603 0.177 144.683);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.423 0.158 29.555);
  --destructive-foreground: oklch(0.91 0.04 22.755);
  --ring: oklch(0.366 0.183 278.394);
  --chart-1: oklch(0.366 0.183 278.394);
  --chart-2: oklch(0.47 0.143 31.461);
  --chart-3: oklch(0.603 0.177 144.683);
  --chart-4: oklch(0.497 0.152 31.482);
  --chart-5: oklch(0.364 0.189 277.412);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.972 0.006 292.433);
  --muted: oklch(0.254 0.012 28.236);
  --muted-foreground: oklch(0.711 0.011 28.02);
  --popover: oklch(0.092 0 180);
  --popover-foreground: oklch(0.982 0.004 292.471);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.982 0.004 292.471);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.366 0.183 278.394);
  --primary-foreground: oklch(0.966 0.013 292.288);
  --secondary: oklch(0.47 0.143 31.461);
  --secondary-foreground: oklch(0.973 0.009 27.982);
  --accent: oklch(0.603 0.177 144.683);
  --accent-foreground: oklch(1 0 180);
  --destructive: oklch(0.64 0.2 28.176);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.366 0.183 278.394);
  --chart-1: oklch(0.366 0.183 278.394);
  --chart-2: oklch(0.47 0.143 31.461);
  --chart-3: oklch(0.603 0.177 144.683);
  --chart-4: oklch(0.497 0.152 31.482);
  --chart-5: oklch(0.364 0.189 277.412);
}