Yi Light is a shadcn/ui theme built around a near-black primary color (#232324) with neutral gray accents (#d4d4d4). The light mode uses a neutral background (#fafafa). Dark mode keeps the near-black primary (#232324) on a neutral background (#fafafa).
| Token | Light | Dark |
|---|---|---|
| Background | #fafafasnow | #fafafasnow |
| Foreground | #383a42darkslategray | #383a42darkslategray |
| Card | #f5f5f5whitesmoke | #f5f5f5whitesmoke |
| Card foreground | #2d2e34darkslategray | #2d2e34darkslategray |
| Popover | #f2f2f2whitesmoke | #f2f2f2whitesmoke |
| Popover foreground | #212227black | #212227black |
| Primary | #232324black | #232324black |
| Primary foreground | #bcbcbdsilver | #bcbcbdsilver |
| Secondary | #bfbfbfsilver | #bfbfbfsilver |
| Secondary foreground | #262626darkslategray | #262626darkslategray |
| Muted | #e9e2e2gainsboro | #e9e2e2gainsboro |
| Muted foreground | #564343darkslategray | #564343darkslategray |
| Accent | #d4d4d4lightgrey | #d4d4d4lightgrey |
| Accent foreground | #3b3b3bdarkslategray | #3b3b3bdarkslategray |
| Destructive | #b21a10firebrick | #b21a10firebrick |
| Destructive foreground | #fef6f6snow | #fef6f6snow |
| Border | #edededwhitesmoke | #edededwhitesmoke |
| Input | #e6e6e6gainsboro | #e6e6e6gainsboro |
| Ring | #232324black | #232324black |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 10.85:1 | AAA |
| Text on card | 12.38:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 8.25:1 | AAA |
| Muted text | 7.22:1 | AAA |
| Accent | 7.53:1 | AAA |
| Destructive | 6.45:1 | AA |
| Text on background | 10.85:1 | AAA |
| Text on card | 12.38:1 | AAA |
| Primary button | 8.24:1 | AAA |
| Secondary button | 8.25:1 | AAA |
| Muted text | 7.22:1 | AAA |
| Accent | 7.53:1 | AAA |
| Destructive | 6.45:1 | AA |
Paste this into your globals.css to use Yi Light in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.985 0 180);
--foreground: oklch(0.351 0.014 274.517);
--muted: oklch(0.919 0.007 17.278);
--muted-foreground: oklch(0.404 0.025 18.259);
--popover: oklch(0.962 0 180);
--popover-foreground: oklch(0.253 0.009 274.584);
--card: oklch(0.97 0 180);
--card-foreground: oklch(0.303 0.011 274.544);
--border: oklch(0.947 0 180);
--input: oklch(0.923 0 153.435);
--primary: oklch(0.258 0.001 286.307);
--primary-foreground: oklch(0.796 0.002 286.358);
--secondary: oklch(0.805 0 169.695);
--secondary-foreground: oklch(0.27 0 180);
--accent: oklch(0.869 0 165.964);
--accent-foreground: oklch(0.351 0 167.471);
--destructive: oklch(0.491 0.187 29.654);
--destructive-foreground: oklch(0.98 0.009 22.314);
--ring: oklch(0.258 0.001 286.307);
--chart-1: oklch(0.258 0.001 286.307);
--chart-2: oklch(0.805 0 169.695);
--chart-3: oklch(0.869 0 165.964);
--chart-4: oklch(0.829 0 180);
--chart-5: oklch(0.254 0.005 286.016);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.985 0 180);
--foreground: oklch(0.351 0.014 274.517);
--muted: oklch(0.919 0.007 17.278);
--muted-foreground: oklch(0.404 0.025 18.259);
--popover: oklch(0.962 0 180);
--popover-foreground: oklch(0.253 0.009 274.584);
--card: oklch(0.97 0 180);
--card-foreground: oklch(0.303 0.011 274.544);
--border: oklch(0.947 0 180);
--input: oklch(0.923 0 153.435);
--primary: oklch(0.258 0.001 286.307);
--primary-foreground: oklch(0.796 0.002 286.358);
--secondary: oklch(0.805 0 169.695);
--secondary-foreground: oklch(0.27 0 180);
--accent: oklch(0.869 0 165.964);
--accent-foreground: oklch(0.351 0 167.471);
--destructive: oklch(0.491 0.187 29.654);
--destructive-foreground: oklch(0.98 0.009 22.314);
--ring: oklch(0.258 0.001 286.307);
--chart-1: oklch(0.258 0.001 286.307);
--chart-2: oklch(0.805 0 169.695);
--chart-3: oklch(0.869 0 165.964);
--chart-4: oklch(0.829 0 180);
--chart-5: oklch(0.254 0.005 286.016);
}