Explanation is a shadcn/ui theme built around a pink primary color (#c06293) with neutral gray accents (#dbdbdb). The light mode uses a neutral background (#ffffff). Dark mode keeps the pink primary (#c06293) on a pink-tinted background (#0f050a).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #0f050ablack |
| Foreground | #0c0408black | #fbf9fasnow |
| Card | #fcfcfcsnow | #13070dblack |
| Card foreground | #080205black | #fdfcfcsnow |
| Popover | #fcfcfcsnow | #13070dblack |
| Popover foreground | #080205black | #fdfcfcsnow |
| Primary | #c06293palevioletred | #c06293palevioletred |
| Primary foreground | #000000black | #000000black |
| Secondary | #dbdbdbgainsboro | #343233darkslategray |
| Secondary foreground | #424242darkslategray | #cdcbcclightgrey |
| Muted | #e1dbdbgainsboro | #241e21black |
| Muted foreground | #594a4adarkslategray | #b5a6aedarkgray |
| Accent | #dbdbdbgainsboro | #343233darkslategray |
| Accent foreground | #424242darkslategray | #cdcbcclightgrey |
| Destructive | #d42811firebrick | #ef523etomato |
| Destructive foreground | #ffffffwhite | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #c06293palevioletred | #c06293palevioletred |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.26:1 | AAA |
| Text on card | 20.12:1 | AAA |
| Primary button | 5.42:1 | AA |
| Secondary button | 7.27:1 | AAA |
| Muted text | 6.11:1 | AA |
| Accent | 7.27:1 | AAA |
| Destructive | 5.09:1 | AA |
| Text on background | 19.11:1 | AAA |
| Text on card | 19.30:1 | AAA |
| Primary button | 5.42:1 | AA |
| Secondary button | 7.85:1 | AAA |
| Muted text | 7.03:1 | AAA |
| Accent | 7.85:1 | AAA |
| Destructive | 3.51:1 | AA Large |
Paste this into your globals.css to use Explanation in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.122 0.023 344.415);
--muted: oklch(0.895 0.007 17.292);
--muted-foreground: oklch(0.425 0.02 17.962);
--popover: oklch(0.992 0 161.565);
--popover-foreground: oklch(0.107 0.02 344.152);
--card: oklch(0.992 0 161.565);
--card-foreground: oklch(0.107 0.02 344.152);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.622 0.133 349.401);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.892 0 180);
--secondary-foreground: oklch(0.38 0 180);
--accent: oklch(0.892 0 180);
--accent-foreground: oklch(0.38 0 180);
--destructive: oklch(0.563 0.209 30.972);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.622 0.133 349.401);
--chart-1: oklch(0.622 0.133 349.401);
--chart-2: oklch(0.892 0 180);
--chart-3: oklch(0.892 0 180);
--chart-4: oklch(0.916 0 180);
--chart-5: oklch(0.622 0.142 349.765);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.137 0.023 346.024);
--foreground: oklch(0.984 0.003 344.353);
--muted: oklch(0.243 0.012 345.499);
--muted-foreground: oklch(0.74 0.02 344.963);
--popover: oklch(0.149 0.026 347.544);
--popover-foreground: oklch(0.992 0.001 344.319);
--card: oklch(0.149 0.026 347.544);
--card-foreground: oklch(0.992 0.001 344.319);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.622 0.133 349.401);
--primary-foreground: oklch(0 0 0);
--secondary: oklch(0.32 0.002 344.422);
--secondary-foreground: oklch(0.845 0.001 344.327);
--accent: oklch(0.32 0.002 344.422);
--accent-foreground: oklch(0.845 0.001 344.327);
--destructive: oklch(0.651 0.196 30.56);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.622 0.133 349.401);
--chart-1: oklch(0.622 0.133 349.401);
--chart-2: oklch(0.32 0.002 344.422);
--chart-3: oklch(0.32 0.002 344.422);
--chart-4: oklch(0.35 0.002 344.426);
--chart-5: oklch(0.622 0.142 349.765);
}