Generate feedback colors (success, warning, error, and info) for shadcn/ui
Go to generatorUsed by 4k+ developers. Want me to build your product next? Let's work together.
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).
| Token | Light | Dark |
|---|---|---|
| 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 |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.79:1 | AAA |
| Text on card | 19.79:1 | AAA |
| Primary button | 4.72:1 | AA |
| Secondary button | 5.48:1 | AA |
| Muted text | 7.51:1 | AAA |
| Accent | 5.48:1 | AA |
| Destructive | 4.31:1 | AA Large |
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 4.72:1 | AA |
| Secondary button | 5.48:1 | AA |
| Muted text | 8.13:1 | AAA |
| Accent | 5.48:1 | AA |
| Destructive | 7.06:1 | AAA |
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);
}