Silkworm is a shadcn/ui theme built around a neutral gray primary color (#a7a9a8) with neutral gray accents (#a9a7a9). The light mode uses a neutral background (#ffffff). Dark mode keeps the neutral gray primary (#a7a9a8) on a green-tinted background (#060f07).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #060f07black |
| Foreground | #000000black | #fcfdfcwhite |
| Card | #ffffffwhite | #060f07black |
| Card foreground | #000000black | #fcfdfcwhite |
| Popover | #ffffffwhite | #060f07black |
| Popover foreground | #000000black | #fcfdfcwhite |
| Primary | #a7a9a8darkgray | #a7a9a8darkgray |
| Primary foreground | #0f0f0fblack | #0f0f0fblack |
| Secondary | #a9a7a9darkgray | #a9a7a9darkgray |
| Secondary foreground | #0f0f0fblack | #0f0f0fblack |
| Muted | #dfd8ddgainsboro | #272026darkslategray |
| Muted foreground | #494148darkslategray | #beb6bdsilver |
| Accent | #a9a7a9darkgray | #a9a7a9darkgray |
| Accent foreground | #0f0f0fblack | #0f0f0fblack |
| Destructive | #661d05maroon | #f4450borangered |
| Destructive foreground | #fbb9a2lightpink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a7a9a8darkgray | #a7a9a8darkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 21.00:1 | AAA |
| Text on card | 21.00:1 | AAA |
| Primary button | 8.12:1 | AAA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 7.03:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 7.18:1 | AAA |
| Text on background | 19.11:1 | AAA |
| Text on card | 19.11:1 | AAA |
| Primary button | 8.12:1 | AAA |
| Secondary button | 8.05:1 | AAA |
| Muted text | 8.00:1 | AAA |
| Accent | 8.05:1 | AAA |
| Destructive | 3.68:1 | AA Large |
Paste this into your globals.css to use Silkworm in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0 0 0);
--muted: oklch(0.889 0.01 330.973);
--muted-foreground: oklch(0.385 0.016 331.369);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0 0 0);
--card: oklch(1 0 180);
--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.734 0.003 150.768);
--primary-foreground: oklch(0.17 0.001 150.763);
--secondary: oklch(0.732 0.003 330.873);
--secondary-foreground: oklch(0.17 0.001 330.879);
--accent: oklch(0.732 0.003 330.873);
--accent-foreground: oklch(0.17 0.001 330.879);
--destructive: oklch(0.346 0.11 37.124);
--destructive-foreground: oklch(0.84 0.083 39.216);
--ring: oklch(0.734 0.003 150.768);
--chart-1: oklch(0.734 0.003 150.768);
--chart-2: oklch(0.732 0.003 330.873);
--chart-3: oklch(0.732 0.003 330.873);
--chart-4: oklch(0.756 0.003 330.867);
--chart-5: oklch(0.736 0.011 150.609);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.155 0.023 149.556);
--foreground: oklch(0.993 0.001 150.805);
--muted: oklch(0.255 0.014 331.53);
--muted-foreground: oklch(0.785 0.013 331.049);
--popover: oklch(0.155 0.023 149.556);
--popover-foreground: oklch(0.993 0.001 150.805);
--card: oklch(0.155 0.023 149.556);
--card-foreground: oklch(0.993 0.001 150.805);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.734 0.003 150.768);
--primary-foreground: oklch(0.17 0.001 150.763);
--secondary: oklch(0.732 0.003 330.873);
--secondary-foreground: oklch(0.17 0.001 330.879);
--accent: oklch(0.732 0.003 330.873);
--accent-foreground: oklch(0.17 0.001 330.879);
--destructive: oklch(0.642 0.218 35.517);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.734 0.003 150.768);
--chart-1: oklch(0.734 0.003 150.768);
--chart-2: oklch(0.732 0.003 330.873);
--chart-3: oklch(0.732 0.003 330.873);
--chart-4: oklch(0.756 0.003 330.867);
--chart-5: oklch(0.736 0.011 150.609);
}