Hatchling is a shadcn/ui theme built around a vivid indigo primary color (#4731f2) with muted light indigo accents (#cdcbd7). The light mode uses a neutral background (#ffffff). Dark mode keeps the vivid indigo primary (#4731f2) on a neutral background (#020104).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #020104black |
| Foreground | #050311black | #ffffffwhite |
| Card | #ffffffwhite | #020104black |
| Card foreground | #050311black | #ffffffwhite |
| Popover | #ffffffwhite | #020104black |
| Popover foreground | #050311black | #ffffffwhite |
| Primary | #4731f2royalblue | #4731f2royalblue |
| Primary foreground | #f2f1fealiceblue | #f2f1fealiceblue |
| Secondary | #cdcbd7lightgrey | #252528darkslategray |
| Secondary foreground | #33313fdarkslategray | #bdbdc2silver |
| Muted | #e6e5eblavender | #15141ablack |
| Muted foreground | #49465ddarkslategray | #a5a2b9darkgray |
| Accent | #cdcbd7lightgrey | #252528darkslategray |
| Accent foreground | #33313fdarkslategray | #bdbdc2silver |
| Destructive | #79300csaddlebrown | #eb7033tomato |
| Destructive foreground | #f9d2bepeachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #4731f2royalblue | #4731f2royalblue |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.43:1 | AAA |
| Text on card | 20.43:1 | AAA |
| Primary button | 6.28:1 | AA |
| Secondary button | 7.94:1 | AAA |
| Muted text | 7.23:1 | AAA |
| Accent | 7.94:1 | AAA |
| Destructive | 6.69:1 | AA |
| Text on background | 20.80:1 | AAA |
| Text on card | 20.80:1 | AAA |
| Primary button | 6.28:1 | AA |
| Secondary button | 8.18:1 | AAA |
| Muted text | 7.39:1 | AAA |
| Accent | 8.18:1 | AAA |
| Destructive | 6.89:1 | AA |
Paste this into your globals.css to use Hatchling in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.115 0.036 287.296);
--muted: oklch(0.924 0.008 291.615);
--muted-foreground: oklch(0.407 0.038 289.939);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.115 0.036 287.296);
--card: oklch(1 0 180);
--card-foreground: oklch(0.115 0.036 287.296);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.492 0.265 275.648);
--primary-foreground: oklch(0.962 0.018 291.425);
--secondary: oklch(0.847 0.016 291.411);
--secondary-foreground: oklch(0.32 0.026 290.208);
--accent: oklch(0.847 0.016 291.411);
--accent-foreground: oklch(0.32 0.026 290.208);
--destructive: oklch(0.407 0.111 43.006);
--destructive-foreground: oklch(0.89 0.051 48.121);
--ring: oklch(0.492 0.265 275.648);
--chart-1: oklch(0.492 0.265 275.648);
--chart-2: oklch(0.847 0.016 291.411);
--chart-3: oklch(0.847 0.016 291.411);
--chart-4: oklch(0.873 0.014 291.485);
--chart-5: oklch(0.49 0.272 274.875);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.079 0.014 289.888);
--foreground: oklch(1 0 180);
--muted: oklch(0.195 0.012 290.594);
--muted-foreground: oklch(0.722 0.033 290.905);
--popover: oklch(0.079 0.014 289.888);
--popover-foreground: oklch(1 0 180);
--card: oklch(0.079 0.014 289.888);
--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.492 0.265 275.648);
--primary-foreground: oklch(0.962 0.018 291.425);
--secondary: oklch(0.265 0.006 291.375);
--secondary-foreground: oklch(0.799 0.007 291.611);
--accent: oklch(0.265 0.006 291.375);
--accent-foreground: oklch(0.799 0.007 291.611);
--destructive: oklch(0.682 0.169 44.44);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.492 0.265 275.648);
--chart-1: oklch(0.492 0.265 275.648);
--chart-2: oklch(0.265 0.006 291.375);
--chart-3: oklch(0.265 0.006 291.375);
--chart-4: oklch(0.295 0.007 291.356);
--chart-5: oklch(0.49 0.272 274.875);
}