Generate feedback colors (success, warning, error, and info) for shadcn/ui

Go to generator

10000+Themes for shadcn/ui

Narrow for shadcn/ui

Narrow is a shadcn/ui theme built around a muted violet primary color (#7c6e87) with muted green accents (#79876e). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the muted violet primary (#7c6e87) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#fdfbfewhite
#000000black
Foreground
#08030dblack
#ffffffwhite
Card
#fdfbfewhite
#000000black
Card foreground
#08030dblack
#ffffffwhite
Popover
#fdfbfewhite
#000000black
Popover foreground
#08030dblack
#ffffffwhite
Primary
#7c6e87gray
#7c6e87gray
Primary foreground
#ffffffwhite
#ffffffwhite
Secondary
#79876egray
#79876egray
Secondary foreground
#000000black
#000000black
Muted
#dfe7d9gainsboro
#1e2618black
Muted foreground
#454644darkslategray
#babbb9silver
Accent
#79876egray
#79876egray
Accent foreground
#000000black
#000000black
Destructive
#e63600orangered
#ff6333tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7c6e87gray
#7c6e87gray

Contrast

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

Light mode
Text on background19.79:1AAA
Text on card19.79:1AAA
Primary button4.72:1AA
Secondary button5.48:1AA
Muted text7.51:1AAA
Accent5.48:1AA
Destructive4.31:1AA Large
Dark mode
Text on background21.00:1AAA
Text on card21.00:1AAA
Primary button4.72:1AA
Secondary button5.48:1AA
Muted text8.13:1AAA
Accent5.48:1AA
Destructive7.06:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.005 311.044);
  --foreground: oklch(0.115 0.032 312.824);
  --muted: oklch(0.919 0.021 131.283);
  --muted-foreground: oklch(0.391 0.003 131.141);
  --popover: oklch(0.99 0.005 311.044);
  --popover-foreground: oklch(0.115 0.032 312.824);
  --card: oklch(0.99 0.005 311.044);
  --card-foreground: oklch(0.115 0.032 312.824);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.56 0.041 310.456);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.604 0.04 131.682);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.604 0.04 131.682);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.603 0.217 33.978);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.56 0.041 310.456);
  --chart-1: oklch(0.56 0.041 310.456);
  --chart-2: oklch(0.604 0.04 131.682);
  --chart-3: oklch(0.604 0.04 131.682);
  --chart-4: oklch(0.63 0.04 131.662);
  --chart-5: oklch(0.555 0.053 310.257);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.255 0.028 132.132);
  --muted-foreground: oklch(0.791 0.002 131.108);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0 0 0);
  --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.56 0.041 310.456);
  --primary-foreground: oklch(1 0 180);
  --secondary: oklch(0.604 0.04 131.682);
  --secondary-foreground: oklch(0 0 0);
  --accent: oklch(0.604 0.04 131.682);
  --accent-foreground: oklch(0 0 0);
  --destructive: oklch(0.694 0.2 36.92);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.56 0.041 310.456);
  --chart-1: oklch(0.56 0.041 310.456);
  --chart-2: oklch(0.604 0.04 131.682);
  --chart-3: oklch(0.604 0.04 131.682);
  --chart-4: oklch(0.63 0.04 131.662);
  --chart-5: oklch(0.555 0.053 310.257);
}