Niche is a shadcn/ui theme built around a near-black primary color (#040201) with near-black accents (#040301). The light mode uses a neutral background (#fdf8f6). Dark mode keeps the near-black primary (#040201) on a red-tinted background (#0c0503).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf8f6snow | #0c0503black |
| Foreground | #170703black | #ffffffwhite |
| Card | #fcf4f2seashell | #100705black |
| Card foreground | #120602black | #ffffffwhite |
| Popover | #fdf8f6snow | #0c0503black |
| Popover foreground | #170703black | #ffffffwhite |
| Primary | #040201black | #040201black |
| Primary foreground | #ca816drosybrown | #ca816drosybrown |
| Secondary | #040102black | #040102black |
| Secondary foreground | #e5b8c5thistle | #e5b8c5thistle |
| Muted | #e2dfe0gainsboro | #201d1eblack |
| Muted foreground | #544549darkslategray | #baabafdarkgray |
| Accent | #040301black | #040301black |
| Accent foreground | #cab06ddarkkhaki | #cab06ddarkkhaki |
| Destructive | #812d09saddlebrown | #ef5a1achocolate |
| Destructive foreground | #fbd2c1peachpuff | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #040201black | #040201black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.67:1 | AAA |
| Text on card | 18.46:1 | AAA |
| Primary button | 6.78:1 | AA |
| Secondary button | 11.85:1 | AAA |
| Muted text | 6.80:1 | AA |
| Accent | 9.75:1 | AAA |
| Destructive | 6.54:1 | AA |
| Text on background | 20.19:1 | AAA |
| Text on card | 19.92:1 | AAA |
| Primary button | 6.78:1 | AA |
| Secondary button | 11.85:1 | AAA |
| Muted text | 7.59:1 | AAA |
| Accent | 9.75:1 | AAA |
| Destructive | 3.41:1 | AA Large |
Paste this into your globals.css to use Niche in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.006 35.991);
--foreground: oklch(0.153 0.032 43.221);
--muted: oklch(0.905 0.004 357.848);
--muted-foreground: oklch(0.407 0.022 359.213);
--popover: oklch(0.983 0.006 35.991);
--popover-foreground: oklch(0.153 0.032 43.221);
--card: oklch(0.974 0.009 35.982);
--card-foreground: oklch(0.14 0.028 45.12);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.089 0.009 41.566);
--primary-foreground: oklch(0.675 0.096 36.203);
--secondary: oklch(0.085 0.012 357.532);
--secondary-foreground: oklch(0.826 0.055 359.555);
--accent: oklch(0.098 0.01 93.364);
--accent-foreground: oklch(0.765 0.091 88.63);
--destructive: oklch(0.416 0.124 39.862);
--destructive-foreground: oklch(0.895 0.051 44.494);
--ring: oklch(0.089 0.009 41.566);
--chart-1: oklch(0.089 0.009 41.566);
--chart-2: oklch(0.085 0.012 357.532);
--chart-3: oklch(0.098 0.01 93.364);
--chart-4: oklch(0.136 0.02 358.892);
--chart-5: oklch(0.088 0.01 42.02);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.127 0.016 42.572);
--foreground: oklch(1 0 180);
--muted: oklch(0.234 0.006 358.436);
--muted-foreground: oklch(0.755 0.019 358.411);
--popover: oklch(0.127 0.016 42.572);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.141 0.018 41.087);
--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.089 0.009 41.566);
--primary-foreground: oklch(0.675 0.096 36.203);
--secondary: oklch(0.085 0.012 357.532);
--secondary-foreground: oklch(0.826 0.055 359.555);
--accent: oklch(0.098 0.01 93.364);
--accent-foreground: oklch(0.765 0.091 88.63);
--destructive: oklch(0.657 0.196 39.799);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.089 0.009 41.566);
--chart-1: oklch(0.089 0.009 41.566);
--chart-2: oklch(0.085 0.012 357.532);
--chart-3: oklch(0.098 0.01 93.364);
--chart-4: oklch(0.136 0.02 358.892);
--chart-5: oklch(0.088 0.01 42.02);
}