Knobby is a shadcn/ui theme built around a muted purple primary color (#5e4559) with muted cyan accents (#45595e). The light mode uses a neutral background (#fefbfd). Dark mode keeps the muted purple primary (#5e4559) on a neutral background (#040103).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfdsnow | #040103black |
| Foreground | #11030eblack | #fbf9fasnow |
| Card | #fdf7fbsnow | #080207black |
| Card foreground | #0d030bblack | #fdfcfdwhite |
| Popover | #fdf7fbsnow | #080207black |
| Popover foreground | #0d030bblack | #fdfcfdwhite |
| Primary | #5e4559dimgray | #5e4559dimgray |
| Primary foreground | #eee8eclinen | #eee8eclinen |
| Secondary | #595e45darkolivegreen | #595e45darkolivegreen |
| Secondary foreground | #ffffffwhite | #ffffffwhite |
| Muted | #dde1d1gainsboro | #2b2e1edarkslategray |
| Muted foreground | #5e5f58dimgray | #a5a7a0darkgray |
| Accent | #45595edarkslategray | #45595edarkslategray |
| Accent foreground | #e8eceelavender | #e8eceelavender |
| Destructive | #8b290esaddlebrown | #e9481corangered |
| Destructive foreground | #fadad1bisque | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #5e4559dimgray | #5e4559dimgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.59:1 | AAA |
| Text on card | 19.22:1 | AAA |
| Primary button | 7.02:1 | AAA |
| Secondary button | 6.76:1 | AA |
| Muted text | 4.84:1 | AA |
| Accent | 6.24:1 | AA |
| Destructive | 6.60:1 | AA |
| Text on background | 19.80:1 | AAA |
| Text on card | 20.05:1 | AAA |
| Primary button | 7.02:1 | AAA |
| Secondary button | 6.76:1 | AA |
| Muted text | 5.69:1 | AA |
| Accent | 6.24:1 | AA |
| Destructive | 3.89:1 | AA Large |
Paste this into your globals.css to use Knobby in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.004 332.678);
--foreground: oklch(0.136 0.037 335.168);
--muted: oklch(0.902 0.022 116.77);
--muted-foreground: oklch(0.483 0.012 116.769);
--popover: oklch(0.982 0.008 332.74);
--popover-foreground: oklch(0.122 0.032 334.178);
--card: oklch(0.982 0.008 332.74);
--card-foreground: oklch(0.122 0.032 334.178);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.425 0.045 334.157);
--primary-foreground: oklch(0.936 0.009 332.768);
--secondary: oklch(0.47 0.038 117.831);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.448 0.025 216.453);
--accent-foreground: oklch(0.941 0.005 216.036);
--destructive: oklch(0.43 0.138 35.326);
--destructive-foreground: oklch(0.912 0.039 35.944);
--ring: oklch(0.425 0.045 334.157);
--chart-1: oklch(0.425 0.045 334.157);
--chart-2: oklch(0.47 0.038 117.831);
--chart-3: oklch(0.448 0.025 216.453);
--chart-4: oklch(0.5 0.041 117.848);
--chart-5: oklch(0.423 0.053 334.454);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.086 0.017 333.419);
--foreground: oklch(0.984 0.002 332.652);
--muted: oklch(0.294 0.028 118.098);
--muted-foreground: oklch(0.725 0.011 116.595);
--popover: oklch(0.108 0.022 333.419);
--popover-foreground: oklch(0.992 0.001 332.634);
--card: oklch(0.108 0.022 333.419);
--card-foreground: oklch(0.992 0.001 332.634);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.425 0.045 334.157);
--primary-foreground: oklch(0.936 0.009 332.768);
--secondary: oklch(0.47 0.038 117.831);
--secondary-foreground: oklch(1 0 180);
--accent: oklch(0.448 0.025 216.453);
--accent-foreground: oklch(0.941 0.005 216.036);
--destructive: oklch(0.626 0.204 35.166);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.425 0.045 334.157);
--chart-1: oklch(0.425 0.045 334.157);
--chart-2: oklch(0.47 0.038 117.831);
--chart-3: oklch(0.448 0.025 216.453);
--chart-4: oklch(0.5 0.041 117.848);
--chart-5: oklch(0.423 0.053 334.454);
}