Imperfect is a shadcn/ui theme built around a neutral gray primary color (#3e4742) with neutral gray accents (#47423e). The light mode uses a neutral background (#fcfdfc). Dark mode keeps the neutral gray primary (#3e4742) on a neutral background (#030705).
| Token | Light | Dark |
|---|---|---|
| Background | #fcfdfcwhite | #030705black |
| Foreground | #05150cblack | #fcfdfcwhite |
| Card | #f8fcfamintcream | #050b07black |
| Card foreground | #04110ablack | #ffffffwhite |
| Popover | #fcfdfcwhite | #030705black |
| Popover foreground | #05150cblack | #fcfdfcwhite |
| Primary | #3e4742darkslategray | #3e4742darkslategray |
| Primary foreground | #d9dedbgainsboro | #d9dedbgainsboro |
| Secondary | #423e47darkslategray | #423e47darkslategray |
| Secondary foreground | #dbd9degainsboro | #dbd9degainsboro |
| Muted | #e5e3e8gainsboro | #19171cblack |
| Muted foreground | #584f63dimgray | #a59cb0darkgray |
| Accent | #47423edarkslategray | #47423edarkslategray |
| Accent foreground | #dedbd9gainsboro | #dedbd9gainsboro |
| Destructive | #651f01maroon | #e34602orangered |
| Destructive foreground | #feb89aburlywood | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #3e4742darkslategray | #3e4742darkslategray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 18.43:1 | AAA |
| Text on card | 18.58:1 | AAA |
| Primary button | 7.07:1 | AAA |
| Secondary button | 7.48:1 | AAA |
| Muted text | 6.07:1 | AA |
| Accent | 7.21:1 | AAA |
| Destructive | 7.16:1 | AAA |
| Text on background | 19.86:1 | AAA |
| Text on card | 19.90:1 | AAA |
| Primary button | 7.07:1 | AAA |
| Secondary button | 7.48:1 | AAA |
| Muted text | 6.75:1 | AA |
| Accent | 7.21:1 | AAA |
| Destructive | 4.08:1 | AA Large |
Paste this into your globals.css to use Imperfect in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.993 0.002 162.563);
--foreground: oklch(0.177 0.03 158.798);
--muted: oklch(0.919 0.007 306.327);
--muted-foreground: oklch(0.445 0.033 305.467);
--popover: oklch(0.993 0.002 162.563);
--popover-foreground: oklch(0.177 0.03 158.798);
--card: oklch(0.987 0.004 162.507);
--card-foreground: oklch(0.16 0.025 160.514);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.388 0.015 161.64);
--primary-foreground: oklch(0.895 0.007 162.437);
--secondary: oklch(0.37 0.017 305.857);
--secondary-foreground: oklch(0.888 0.007 306.325);
--accent: oklch(0.382 0.01 61.846);
--accent-foreground: oklch(0.893 0.004 62.13);
--destructive: oklch(0.346 0.107 39.995);
--destructive-foreground: oklch(0.841 0.091 44.154);
--ring: oklch(0.388 0.015 161.64);
--chart-1: oklch(0.388 0.015 161.64);
--chart-2: oklch(0.37 0.017 305.857);
--chart-3: oklch(0.382 0.01 61.846);
--chart-4: oklch(0.398 0.018 305.846);
--chart-5: oklch(0.391 0.021 161.22);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.121 0.012 162.637);
--foreground: oklch(0.993 0.001 162.589);
--muted: oklch(0.209 0.011 305.788);
--muted-foreground: oklch(0.706 0.03 305.889);
--popover: oklch(0.121 0.012 162.637);
--popover-foreground: oklch(0.993 0.001 162.589);
--card: oklch(0.139 0.013 162.614);
--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.388 0.015 161.64);
--primary-foreground: oklch(0.895 0.007 162.437);
--secondary: oklch(0.37 0.017 305.857);
--secondary-foreground: oklch(0.888 0.007 306.325);
--accent: oklch(0.382 0.01 61.846);
--accent-foreground: oklch(0.893 0.004 62.13);
--destructive: oklch(0.614 0.203 37.351);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.388 0.015 161.64);
--chart-1: oklch(0.388 0.015 161.64);
--chart-2: oklch(0.37 0.017 305.857);
--chart-3: oklch(0.382 0.01 61.846);
--chart-4: oklch(0.398 0.018 305.846);
--chart-5: oklch(0.391 0.021 161.22);
}