Nifty is a shadcn/ui theme built around a near-white primary color (#ffffff) with near-white accents (#ffffff). The light mode uses a neutral background (#fdf7f7). Dark mode keeps the near-white primary (#ffffff) on a neutral background (#080202).
| Token | Light | Dark |
|---|---|---|
| Background | #fdf7f7snow | #080202black |
| Foreground | #140505black | #ffffffwhite |
| Card | #fdf7f7snow | #080202black |
| Card foreground | #140505black | #ffffffwhite |
| Popover | #fdf7f7snow | #080202black |
| Popover foreground | #140505black | #ffffffwhite |
| Primary | #ffffffwhite | #ffffffwhite |
| Primary foreground | #333333darkslategray | #333333darkslategray |
| Secondary | #ffffffwhite | #ffffffwhite |
| Secondary foreground | #333333darkslategray | #333333darkslategray |
| Muted | #ebe5e5linen | #1a1414black |
| Muted foreground | #493636darkslategray | #c9b6b6silver |
| Accent | #ffffffwhite | #ffffffwhite |
| Accent foreground | #333333darkslategray | #333333darkslategray |
| Destructive | #682603maroon | #fa7933coral |
| Destructive foreground | #fdc1a1navajowhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #ffffffwhite | #ffffffwhite |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.81:1 | AAA |
| Text on card | 18.81:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 12.63:1 | AAA |
| Muted text | 9.06:1 | AAA |
| Accent | 12.63:1 | AAA |
| Destructive | 7.10:1 | AAA |
| Text on background | 20.58:1 | AAA |
| Text on card | 20.58:1 | AAA |
| Primary button | 12.63:1 | AAA |
| Secondary button | 12.63:1 | AAA |
| Muted text | 9.39:1 | AAA |
| Accent | 12.63:1 | AAA |
| Destructive | 7.82:1 | AAA |
Paste this into your globals.css to use Nifty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.981 0.006 17.261);
--foreground: oklch(0.144 0.03 21.515);
--muted: oklch(0.927 0.006 17.265);
--muted-foreground: oklch(0.355 0.028 18.534);
--popover: oklch(0.981 0.006 17.261);
--popover-foreground: oklch(0.144 0.03 21.515);
--card: oklch(0.981 0.006 17.261);
--card-foreground: oklch(0.144 0.03 21.515);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(1 0 180);
--secondary-foreground: oklch(0.321 0 180);
--accent: oklch(1 0 180);
--accent-foreground: oklch(0.321 0 180);
--destructive: oklch(0.363 0.104 43.39);
--destructive-foreground: oklch(0.856 0.082 49.539);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(1 0 180);
--chart-3: oklch(1 0 180);
--chart-4: oklch(1.023 0 180);
--chart-5: oklch(1 0 180);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.103 0.019 20.998);
--foreground: oklch(1 0 180);
--muted: oklch(0.199 0.009 17.935);
--muted-foreground: oklch(0.791 0.022 17.625);
--popover: oklch(0.103 0.019 20.998);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.103 0.019 20.998);
--card-foreground: oklch(1 0 180);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(1 0 180);
--primary-foreground: oklch(0.321 0 180);
--secondary: oklch(1 0 180);
--secondary-foreground: oklch(0.321 0 180);
--accent: oklch(1 0 180);
--accent-foreground: oklch(0.321 0 180);
--destructive: oklch(0.716 0.177 45.581);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(1 0 180);
--chart-1: oklch(1 0 180);
--chart-2: oklch(1 0 180);
--chart-3: oklch(1 0 180);
--chart-4: oklch(1.023 0 180);
--chart-5: oklch(1 0 180);
}