Narrow for shadcn/ui

Narrow is a shadcn/ui theme built around a muted deep red primary color (#1d1617) with muted deep teal accents (#161d1c). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted deep red primary (#1d1617) on a red-tinted background (#0e0607).

Color palette

TokenLightDark
Background
#ffffffwhite
#0e0607black
Foreground
#040101black
#fdfbfcsnow
Card
#ffffffwhite
#0e0607black
Card foreground
#040101black
#fdfbfcsnow
Popover
#ffffffwhite
#0e0607black
Popover foreground
#040101black
#fdfbfcsnow
Primary
#1d1617black
#1d1617black
Primary foreground
#bea7aadarkgray
#bea7aadarkgray
Secondary
#161d1cblack
#161d1cblack
Secondary foreground
#a7bebbsilver
#a7bebbsilver
Muted
#e7eeedlavender
#111817black
Muted foreground
#545959dimgray
#a6abaadarkgray
Accent
#161d1cblack
#161d1cblack
Accent foreground
#a7bebbsilver
#a7bebbsilver
Destructive
#710f0amaroon
#eb1f14red
Destructive foreground
#f8b7b4lightpink
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#1d1617black
#1d1617black

Contrast

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

Light mode
Text on background20.79:1AAA
Text on card20.79:1AAA
Primary button7.89:1AAA
Secondary button8.72:1AAA
Muted text6.04:1AA
Accent8.72:1AAA
Destructive7.02:1AAA
Dark mode
Text on background19.44:1AAA
Text on card19.44:1AAA
Primary button7.89:1AAA
Secondary button8.72:1AAA
Muted text7.75:1AAA
Accent8.72:1AAA
Destructive4.44:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.079 0.021 7.825);
  --muted: oklch(0.943 0.007 186.404);
  --muted-foreground: oklch(0.46 0.007 186.222);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.079 0.021 7.825);
  --card: oklch(1 0 180);
  --card-foreground: oklch(0.079 0.021 7.825);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.209 0.013 8.098);
  --primary-foreground: oklch(0.749 0.027 7.499);
  --secondary: oklch(0.224 0.011 185.248);
  --secondary-foreground: oklch(0.783 0.026 185.75);
  --accent: oklch(0.224 0.011 185.248);
  --accent-foreground: oklch(0.783 0.026 185.75);
  --destructive: oklch(0.353 0.132 29.011);
  --destructive-foreground: oklch(0.84 0.076 22.233);
  --ring: oklch(0.209 0.013 8.098);
  --chart-1: oklch(0.209 0.013 8.098);
  --chart-2: oklch(0.224 0.011 185.248);
  --chart-3: oklch(0.224 0.011 185.248);
  --chart-4: oklch(0.259 0.014 185.134);
  --chart-5: oklch(0.208 0.015 8.421);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.136 0.017 7.894);
  --foreground: oklch(0.991 0.002 6.648);
  --muted: oklch(0.2 0.01 185.274);
  --muted-foreground: oklch(0.736 0.006 186.388);
  --popover: oklch(0.136 0.017 7.894);
  --popover-foreground: oklch(0.991 0.002 6.648);
  --card: oklch(0.136 0.017 7.894);
  --card-foreground: oklch(0.991 0.002 6.648);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.209 0.013 8.098);
  --primary-foreground: oklch(0.749 0.027 7.499);
  --secondary: oklch(0.224 0.011 185.248);
  --secondary-foreground: oklch(0.783 0.026 185.75);
  --accent: oklch(0.224 0.011 185.248);
  --accent-foreground: oklch(0.783 0.026 185.75);
  --destructive: oklch(0.599 0.233 29.365);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.209 0.013 8.098);
  --chart-1: oklch(0.209 0.013 8.098);
  --chart-2: oklch(0.224 0.011 185.248);
  --chart-3: oklch(0.224 0.011 185.248);
  --chart-4: oklch(0.259 0.014 185.134);
  --chart-5: oklch(0.208 0.015 8.421);
}