Knobby is a shadcn/ui theme built around a neutral gray primary color (#2e2d2f) with neutral gray accents (#2f2d2e). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#2e2d2f) on a neutral background (#030104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030104black |
| Foreground | #000000black | #fdfcfdwhite |
| Card | #fcfcfcsnow | #060308black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #ffffffwhite | #030104black |
| Popover foreground | #000000black | #fdfcfdwhite |
| Primary | #2e2d2fdarkslategray | #2e2d2fdarkslategray |
| Primary foreground | #c7c6c8silver | #c7c6c8silver |
| Secondary | #2d2d2fdarkslategray | #2d2d2fdarkslategray |
| Secondary foreground | #c6c6c8silver | #c6c6c8silver |
| Muted | #dcd8e9gainsboro | #1a1627black |
| Muted foreground | #4c475cdarkslategray | #a8a3b8darkgray |
| Accent | #2f2d2edarkslategray | #2f2d2edarkslategray |
| Accent foreground | #c8c6c7silver | #c8c6c7silver |
| Destructive | #75290bsaddlebrown | #ed6d3btomato |
| Destructive foreground | #f8cbb9peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #2e2d2fdarkslategray | #2e2d2fdarkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 20.54:1 | AAA |
| Primary button | 8.04:1 | AAA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 6.36:1 | AA |
| Accent | 8.05:1 | AAA |
| Destructive | 6.87:1 | AA |
| Text on background | 20.29:1 | AAA |
| Text on card | 20.53:1 | AAA |
| Primary button | 8.04:1 | AAA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 7.21:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 6.86:1 | AA |
Paste this into your globals.css to use Knobby in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.891 0.023 296.618);
--muted-foreground: oklch(0.411 0.036 295.492);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(0.992 0 161.565);
--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.299 0.004 317.16);
--primary-foreground: oklch(0.828 0.004 317.179);
--secondary: oklch(0.298 0.003 296.879);
--secondary-foreground: oklch(0.827 0.003 297.011);
--accent: oklch(0.3 0.004 333.435);
--accent-foreground: oklch(0.828 0.003 333.307);
--destructive: oklch(0.389 0.114 39.384);
--destructive-foreground: oklch(0.877 0.057 42.678);
--ring: oklch(0.299 0.004 317.16);
--chart-1: oklch(0.299 0.004 317.16);
--chart-2: oklch(0.298 0.003 296.879);
--chart-3: oklch(0.3 0.004 333.435);
--chart-4: oklch(0.328 0.004 296.872);
--chart-5: oklch(0.297 0.009 317.117);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.085 0.017 318.892);
--foreground: oklch(0.992 0.002 317.186);
--muted: oklch(0.215 0.032 294.222);
--muted-foreground: oklch(0.726 0.031 296.311);
--popover: oklch(0.085 0.017 318.892);
--popover-foreground: oklch(0.992 0.002 317.186);
--card: oklch(0.106 0.021 318.892);
--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.299 0.004 317.16);
--primary-foreground: oklch(0.828 0.004 317.179);
--secondary: oklch(0.298 0.003 296.879);
--secondary-foreground: oklch(0.827 0.003 297.011);
--accent: oklch(0.3 0.004 333.435);
--accent-foreground: oklch(0.828 0.003 333.307);
--destructive: oklch(0.682 0.17 40.894);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.299 0.004 317.16);
--chart-1: oklch(0.299 0.004 317.16);
--chart-2: oklch(0.298 0.003 296.879);
--chart-3: oklch(0.3 0.004 333.435);
--chart-4: oklch(0.328 0.004 296.872);
--chart-5: oklch(0.297 0.009 317.117);
}