Gnat is a shadcn/ui theme built around a muted light blue primary color (#c6cad7) with muted light violet accents (#cbc6d7). The light mode uses a neutral background (#f8f9fc). Dark mode keeps the muted light blue primary (#c6cad7) on a neutral background (#010204).
| Token | Light | Dark |
|---|---|---|
| Background | #f8f9fcghostwhite | #010204black |
| Foreground | #000000black | #f9fafaghostwhite |
| Card | #f5f6fawhitesmoke | #020408black |
| Card foreground | #000000black | #fcfcfdwhite |
| Popover | #f5f6fawhitesmoke | #020408black |
| Popover foreground | #000000black | #fcfcfdwhite |
| Primary | #c6cad7lightgrey | #c6cad7lightgrey |
| Primary foreground | #2c303fdarkslategray | #2c303fdarkslategray |
| Secondary | #c6d2d7lightgrey | #c6d2d7lightgrey |
| Secondary foreground | #2c393fdarkslategray | #2c393fdarkslategray |
| Muted | #e9ebedlavender | #121516black |
| Muted foreground | #3a454adarkslategray | #b5c0c5silver |
| Accent | #cbc6d7thistle | #cbc6d7thistle |
| Accent foreground | #322c3fdarkslategray | #322c3fdarkslategray |
| Destructive | #7d1703maroon | #fb4b28tomato |
| Destructive foreground | #fdc0b4lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c6cad7lightgrey | #c6cad7lightgrey |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.92:1 | AAA |
| Text on card | 19.39:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 7.70:1 | AAA |
| Muted text | 8.26:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 6.70:1 | AA |
| Text on background | 19.86:1 | AAA |
| Text on card | 20.04:1 | AAA |
| Primary button | 7.99:1 | AAA |
| Secondary button | 7.70:1 | AAA |
| Muted text | 9.85:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 3.42:1 | AA Large |
Paste this into your globals.css to use Gnat in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.982 0.004 274.985);
--foreground: oklch(0 0 0);
--muted: oklch(0.939 0.003 225.024);
--muted-foreground: oklch(0.384 0.017 225.566);
--popover: oklch(0.973 0.006 274.959);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.973 0.006 274.959);
--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.839 0.019 274.753);
--primary-foreground: oklch(0.312 0.027 273.82);
--secondary: oklch(0.856 0.014 225.179);
--secondary-foreground: oklch(0.336 0.019 225.83);
--accent: oklch(0.836 0.023 299.569);
--accent-foreground: oklch(0.309 0.033 298.203);
--destructive: oklch(0.384 0.139 32.835);
--destructive-foreground: oklch(0.861 0.073 31.454);
--ring: oklch(0.839 0.019 274.753);
--chart-1: oklch(0.839 0.019 274.753);
--chart-2: oklch(0.856 0.014 225.179);
--chart-3: oklch(0.836 0.023 299.569);
--chart-4: oklch(0.879 0.012 225.14);
--chart-5: oklch(0.837 0.022 274.699);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.082 0.012 268.864);
--foreground: oklch(0.984 0.001 275.019);
--muted: oklch(0.194 0.005 225.307);
--muted-foreground: oklch(0.8 0.014 225.189);
--popover: oklch(0.104 0.015 268.864);
--popover-foreground: oklch(0.992 0.001 275.027);
--card: oklch(0.104 0.015 268.864);
--card-foreground: oklch(0.992 0.001 275.027);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.839 0.019 274.753);
--primary-foreground: oklch(0.312 0.027 273.82);
--secondary: oklch(0.856 0.014 225.179);
--secondary-foreground: oklch(0.336 0.019 225.83);
--accent: oklch(0.836 0.023 299.569);
--accent-foreground: oklch(0.309 0.033 298.203);
--destructive: oklch(0.66 0.217 33.087);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.839 0.019 274.753);
--chart-1: oklch(0.839 0.019 274.753);
--chart-2: oklch(0.856 0.014 225.179);
--chart-3: oklch(0.836 0.023 299.569);
--chart-4: oklch(0.879 0.012 225.14);
--chart-5: oklch(0.837 0.022 274.699);
}