Narrow for shadcn/ui

Narrow is a shadcn/ui theme built around a near-black primary color (#040901) with muted light green accents (#dbded8). The light mode uses a neutral background (#fcfefb). Dark mode keeps the near-black primary (#040901) on a neutral background (#020401).

Color palette

TokenLightDark
Background
#fcfefbwhite
#020401black
Foreground
#091004black
#fafbf9snow
Card
#f9fdf7mintcream
#050802black
Card foreground
#070c03black
#fcfdfcwhite
Popover
#f9fdf7mintcream
#050802black
Popover foreground
#070c03black
#fcfdfcwhite
Primary
#040901black
#040901black
Primary foreground
#5abf18limegreen
#5abf18limegreen
Secondary
#dbded8gainsboro
#1e201eblack
Secondary foreground
#41483ddarkslategray
#b7bab5silver
Muted
#e5eae1gainsboro
#191e15black
Muted foreground
#4d5747darkslategray
#aeb8a8darkgray
Accent
#dbded8gainsboro
#1e201eblack
Accent foreground
#41483ddarkslategray
#b7bab5silver
Destructive
#ba2a0dfirebrick
#e53310orangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#040901black
#040901black

Contrast

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

Light mode
Text on background19.05:1AAA
Text on card19.24:1AAA
Primary button8.51:1AAA
Secondary button6.96:1AA
Muted text6.20:1AA
Accent6.96:1AA
Destructive6.13:1AA
Dark mode
Text on background19.82:1AAA
Text on card19.78:1AAA
Primary button8.51:1AAA
Secondary button8.38:1AAA
Muted text8.25:1AAA
Accent8.38:1AAA
Destructive4.36:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.995 0.005 132.395);
  --foreground: oklch(0.161 0.027 132.033);
  --muted: oklch(0.931 0.014 132.468);
  --muted-foreground: oklch(0.443 0.028 132.851);
  --popover: oklch(0.99 0.01 132.432);
  --popover-foreground: oklch(0.144 0.023 131.079);
  --card: oklch(0.99 0.01 132.432);
  --card-foreground: oklch(0.144 0.023 131.079);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.129 0.028 130.41);
  --primary-foreground: oklch(0.715 0.209 136.972);
  --secondary: oklch(0.897 0.009 132.43);
  --secondary-foreground: oklch(0.391 0.019 132.741);
  --accent: oklch(0.897 0.009 132.43);
  --accent-foreground: oklch(0.391 0.019 132.741);
  --destructive: oklch(0.516 0.184 32.593);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.129 0.028 130.41);
  --chart-1: oklch(0.129 0.028 130.41);
  --chart-2: oklch(0.897 0.009 132.43);
  --chart-3: oklch(0.897 0.009 132.43);
  --chart-4: oklch(0.919 0.007 132.413);
  --chart-5: oklch(0.13 0.029 130.343);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.1 0.016 130.962);
  --foreground: oklch(0.986 0.002 132.373);
  --muted: oklch(0.226 0.019 133.032);
  --muted-foreground: oklch(0.77 0.024 132.6);
  --popover: oklch(0.125 0.02 130.962);
  --popover-foreground: oklch(0.993 0.001 132.365);
  --card: oklch(0.125 0.02 130.962);
  --card-foreground: oklch(0.993 0.001 132.365);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.129 0.028 130.41);
  --primary-foreground: oklch(0.715 0.209 136.972);
  --secondary: oklch(0.24 0.004 132.478);
  --secondary-foreground: oklch(0.785 0.007 132.422);
  --accent: oklch(0.24 0.004 132.478);
  --accent-foreground: oklch(0.785 0.007 132.422);
  --destructive: oklch(0.601 0.217 32.471);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.129 0.028 130.41);
  --chart-1: oklch(0.129 0.028 130.41);
  --chart-2: oklch(0.24 0.004 132.478);
  --chart-3: oklch(0.24 0.004 132.478);
  --chart-4: oklch(0.272 0.005 132.486);
  --chart-5: oklch(0.13 0.029 130.343);
}