Yin is a shadcn/ui theme built around a deep blue primary color (#09172a) with muted light blue accents (#cfd5dd). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#09172a) on a neutral background (#030507).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #030507black |
| Foreground | #010204black | #f9fafbghostwhite |
| Card | #ffffffwhite | #030507black |
| Card foreground | #010204black | #f9fafbghostwhite |
| Popover | #ffffffwhite | #030507black |
| Popover foreground | #010204black | #f9fafbghostwhite |
| Primary | #09172ablack | #09172ablack |
| Primary foreground | #80aae5cornflowerblue | #80aae5cornflowerblue |
| Secondary | #e5e8eblavender | #2e3238darkslategray |
| Secondary foreground | #464d59darkslategray | #c7cbd1lightgrey |
| Muted | #e5eaf1lavender | #0e131ablack |
| Muted foreground | #505a68dimgray | #97a1afdarkgray |
| Accent | #cfd5ddlightgrey | #3b4554darkslategray |
| Accent foreground | #333b48darkslategray | #dbdfe6gainsboro |
| Destructive | #973602saddlebrown | #fb6413orangered |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #09172ablack | #09172ablack |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.75:1 | AAA |
| Text on card | 20.75:1 | AAA |
| Primary button | 7.55:1 | AAA |
| Secondary button | 6.90:1 | AA |
| Muted text | 5.76:1 | AA |
| Accent | 7.64:1 | AAA |
| Destructive | 7.38:1 | AAA |
| Text on background | 19.54:1 | AAA |
| Text on card | 19.54:1 | AAA |
| Primary button | 7.55:1 | AAA |
| Secondary button | 7.88:1 | AAA |
| Muted text | 7.10:1 | AAA |
| Accent | 7.24:1 | AAA |
| Destructive | 6.95:1 | AA |
Paste this into your globals.css to use Yin in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.086 0.013 246.175);
--muted: oklch(0.934 0.011 256.696);
--muted-foreground: oklch(0.463 0.026 256.798);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.086 0.013 246.175);
--card: oklch(1 0 180);
--card-foreground: oklch(0.086 0.013 246.175);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.203 0.044 257.04);
--primary-foreground: oklch(0.731 0.098 256.875);
--secondary: oklch(0.929 0.005 256.674);
--secondary-foreground: oklch(0.419 0.021 256.789);
--accent: oklch(0.871 0.013 256.707);
--accent-foreground: oklch(0.351 0.024 256.814);
--destructive: oklch(0.466 0.14 41.734);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.203 0.044 257.04);
--chart-1: oklch(0.203 0.044 257.04);
--chart-2: oklch(0.929 0.005 256.674);
--chart-3: oklch(0.871 0.013 256.707);
--chart-4: oklch(0.953 0.003 256.666);
--chart-5: oklch(0.202 0.046 256.993);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.112 0.008 251.562);
--foreground: oklch(0.984 0.002 256.66);
--muted: oklch(0.187 0.016 256.831);
--muted-foreground: oklch(0.706 0.023 256.757);
--popover: oklch(0.112 0.008 251.562);
--popover-foreground: oklch(0.984 0.002 256.66);
--card: oklch(0.112 0.008 251.562);
--card-foreground: oklch(0.984 0.002 256.66);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.203 0.044 257.04);
--primary-foreground: oklch(0.731 0.098 256.875);
--secondary: oklch(0.316 0.011 256.76);
--secondary-foreground: oklch(0.841 0.009 256.691);
--accent: oklch(0.388 0.029 256.82);
--accent-foreground: oklch(0.903 0.01 256.695);
--destructive: oklch(0.689 0.201 42.3);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.203 0.044 257.04);
--chart-1: oklch(0.203 0.044 257.04);
--chart-2: oklch(0.316 0.011 256.76);
--chart-3: oklch(0.388 0.029 256.82);
--chart-4: oklch(0.346 0.012 256.762);
--chart-5: oklch(0.202 0.046 256.993);
}