Nifty is a shadcn/ui theme built around a deep blue primary color (#173e69) with deep green accents (#3e6917). The light mode uses a neutral background (#f7fafd). Dark mode keeps the deep blue primary (#173e69) on a blue-tinted background (#060a0e).
| Token | Light | Dark |
|---|---|---|
| Background | #f7fafdghostwhite | #060a0eblack |
| Foreground | #000000black | #fbfcfdwhite |
| Card | #f3f7fcaliceblue | #080d12black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #f7fafdghostwhite | #060a0eblack |
| Popover foreground | #000000black | #fbfcfdwhite |
| Primary | #173e69midnightblue | #173e69midnightblue |
| Primary foreground | #c0d8f1powderblue | #c0d8f1powderblue |
| Secondary | #69173ebrown | #69173ebrown |
| Secondary foreground | #f1c0d8pink | #f1c0d8pink |
| Muted | #e5dce0gainsboro | #231a1eblack |
| Muted foreground | #454545darkslategray | #bababasilver |
| Accent | #3e6917darkolivegreen | #3e6917darkolivegreen |
| Accent foreground | #ffffffwhite | #ffffffwhite |
| Destructive | #9d4210saddlebrown | #d95b17chocolate |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #173e69midnightblue | #173e69midnightblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.01:1 | AAA |
| Text on card | 19.53:1 | AAA |
| Primary button | 7.40:1 | AAA |
| Secondary button | 7.42:1 | AAA |
| Muted text | 7.13:1 | AAA |
| Accent | 6.51:1 | AA |
| Destructive | 6.54:1 | AA |
| Text on background | 19.32:1 | AAA |
| Text on card | 19.55:1 | AAA |
| Primary button | 7.40:1 | AAA |
| Secondary button | 7.42:1 | AAA |
| Muted text | 8.73:1 | AAA |
| Accent | 6.51:1 | AA |
| Destructive | 3.85:1 | AA Large |
Paste this into your globals.css to use Nifty in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.983 0.005 249.7);
--foreground: oklch(0 0 0);
--muted: oklch(0.902 0.012 346.357);
--muted-foreground: oklch(0.39 0 165.964);
--popover: oklch(0.983 0.005 249.7);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.975 0.008 249.725);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.361 0.086 252.614);
--primary-foreground: oklch(0.873 0.043 250.085);
--secondary: oklch(0.356 0.12 355.712);
--secondary-foreground: oklch(0.859 0.064 347.887);
--accent: oklch(0.471 0.119 133.306);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.493 0.134 43.934);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.361 0.086 252.614);
--chart-1: oklch(0.361 0.086 252.614);
--chart-2: oklch(0.356 0.12 355.712);
--chart-3: oklch(0.471 0.119 133.306);
--chart-4: oklch(0.385 0.131 355.925);
--chart-5: oklch(0.361 0.089 252.853);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.142 0.012 246.994);
--foreground: oklch(0.992 0.002 249.666);
--muted: oklch(0.231 0.017 347.831);
--muted-foreground: oklch(0.789 0 171.254);
--popover: oklch(0.142 0.012 246.994);
--popover-foreground: oklch(0.992 0.002 249.666);
--card: oklch(0.154 0.014 249.571);
--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.361 0.086 252.614);
--primary-foreground: oklch(0.873 0.043 250.085);
--secondary: oklch(0.356 0.12 355.712);
--secondary-foreground: oklch(0.859 0.064 347.887);
--accent: oklch(0.471 0.119 133.306);
--accent-foreground: oklch(1 0 180);
--destructive: oklch(0.623 0.174 43.394);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.361 0.086 252.614);
--chart-1: oklch(0.361 0.086 252.614);
--chart-2: oklch(0.356 0.12 355.712);
--chart-3: oklch(0.471 0.119 133.306);
--chart-4: oklch(0.385 0.131 355.925);
--chart-5: oklch(0.361 0.089 252.853);
}