Narrow is a shadcn/ui theme built around a deep indigo primary color (#070818) with deep green accents (#081807). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep indigo primary (#070818) on a neutral background (#000000).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #000000black |
| Foreground | #040515black | #fcfcfdwhite |
| Card | #fcfcfcsnow | #030303black |
| Card foreground | #030411black | #ffffffwhite |
| Popover | #ffffffwhite | #000000black |
| Popover foreground | #040515black | #fcfcfdwhite |
| Primary | #070818black | #070818black |
| Primary foreground | #c8caeflightsteelblue | #c8caeflightsteelblue |
| Secondary | #180708black | #180708black |
| Secondary foreground | #d8797dpalevioletred | #d8797dpalevioletred |
| Muted | #e6dbdcgainsboro | #24191ablack |
| Muted foreground | #685556dimgray | #aa9798rosybrown |
| Accent | #081807black | #081807black |
| Accent foreground | #3bb635limegreen | #3bb635limegreen |
| Destructive | #9d1402darkred | #fd2d12orangered |
| Destructive foreground | #ffd7d2bisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #070818black | #070818black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.23:1 | AAA |
| Text on card | 19.96:1 | AAA |
| Primary button | 12.46:1 | AAA |
| Secondary button | 6.48:1 | AA |
| Muted text | 5.14:1 | AA |
| Accent | 6.94:1 | AA |
| Destructive | 6.30:1 | AA |
| Text on background | 20.48:1 | AAA |
| Text on card | 20.67:1 | AAA |
| Primary button | 12.46:1 | AAA |
| Secondary button | 6.48:1 | AA |
| Muted text | 6.16:1 | AA |
| Accent | 6.94:1 | AA |
| Destructive | 3.78:1 | AA Large |
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.127 0.037 276.445);
--muted: oklch(0.9 0.011 13.86);
--muted-foreground: oklch(0.468 0.025 14.69);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.127 0.037 276.445);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.117 0.032 276.643);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.143 0.035 278.312);
--primary-foreground: oklch(0.848 0.052 282.854);
--secondary: oklch(0.157 0.031 17.597);
--secondary-foreground: oklch(0.681 0.119 17.521);
--accent: oklch(0.188 0.04 142.632);
--accent-foreground: oklch(0.683 0.199 142.372);
--destructive: oklch(0.444 0.171 31.041);
--destructive-foreground: oklch(0.911 0.045 26.85);
--ring: oklch(0.143 0.035 278.312);
--chart-1: oklch(0.143 0.035 278.312);
--chart-2: oklch(0.157 0.031 17.597);
--chart-3: oklch(0.188 0.04 142.632);
--chart-4: oklch(0.189 0.043 19.102);
--chart-5: oklch(0.141 0.037 277.781);
}
.dark {
--radius: 0.5rem;
--background: oklch(0 0 0);
--foreground: oklch(0.991 0.001 283.949);
--muted: oklch(0.228 0.017 15.105);
--muted-foreground: oklch(0.694 0.022 14.255);
--popover: oklch(0 0 0);
--popover-foreground: oklch(0.991 0.001 283.949);
--card: oklch(0.092 0 180);
--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.143 0.035 278.312);
--primary-foreground: oklch(0.848 0.052 282.854);
--secondary: oklch(0.157 0.031 17.597);
--secondary-foreground: oklch(0.681 0.119 17.521);
--accent: oklch(0.188 0.04 142.632);
--accent-foreground: oklch(0.683 0.199 142.372);
--destructive: oklch(0.639 0.241 30.891);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.143 0.035 278.312);
--chart-1: oklch(0.143 0.035 278.312);
--chart-2: oklch(0.157 0.031 17.597);
--chart-3: oklch(0.188 0.04 142.632);
--chart-4: oklch(0.189 0.043 19.102);
--chart-5: oklch(0.141 0.037 277.781);
}