Tragic is a shadcn/ui theme built around a light pink primary color (#fbeaf0) with light red accents (#fbecea). The light mode uses a neutral background (#fefbfc). Dark mode keeps the light pink primary (#fbeaf0) on a pink-tinted background (#0b0507).
| Token | Light | Dark |
|---|---|---|
| Background | #fefbfcsnow | #0b0507black |
| Foreground | #040102black | #fdfcfcsnow |
| Card | #fdf7f9snow | #0e0609black |
| Card foreground | #000000black | #ffffffwhite |
| Popover | #fefbfcsnow | #0b0507black |
| Popover foreground | #040102black | #fdfcfcsnow |
| Primary | #fbeaf0lavenderblush | #fbeaf0lavenderblush |
| Primary foreground | #961d4bbrown | #961d4bbrown |
| Secondary | #fbeaf9lavenderblush | #fbeaf9lavenderblush |
| Secondary foreground | #961d88darkmagenta | #961d88darkmagenta |
| Muted | #e7cae4thistle | #351831darkslategray |
| Muted foreground | #4e3b4cdarkslategray | #c4b1c2silver |
| Accent | #fbecealinen | #fbecealinen |
| Accent foreground | #962b1dbrown | #962b1dbrown |
| Destructive | #ce5109chocolate | #f77d36coral |
| Destructive foreground | #ffffffwhite | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #fbeaf0lavenderblush | #fbeaf0lavenderblush |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 20.19:1 | AAA |
| Text on card | 19.82:1 | AAA |
| Primary button | 7.02:1 | AAA |
| Secondary button | 6.43:1 | AA |
| Muted text | 6.81:1 | AA |
| Accent | 6.85:1 | AA |
| Destructive | 4.38:1 | AA Large |
| Text on background | 19.76:1 | AAA |
| Text on card | 19.99:1 | AAA |
| Primary button | 7.02:1 | AAA |
| Secondary button | 6.43:1 | AA |
| Muted text | 7.86:1 | AAA |
| Accent | 6.85:1 | AA |
| Destructive | 7.91:1 | AAA |
Paste this into your globals.css to use Tragic in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.99 0.004 351.698);
--foreground: oklch(0.084 0.015 351.225);
--muted: oklch(0.872 0.047 329.745);
--muted-foreground: oklch(0.381 0.038 330.249);
--popover: oklch(0.99 0.004 351.698);
--popover-foreground: oklch(0.084 0.015 351.225);
--card: oklch(0.981 0.007 351.808);
--card-foreground: oklch(0 0 0);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.951 0.021 352.203);
--primary-foreground: oklch(0.449 0.159 3.766);
--secondary: oklch(0.954 0.027 329.464);
--secondary-foreground: oklch(0.475 0.191 333.645);
--accent: oklch(0.953 0.017 26.566);
--accent-foreground: oklch(0.453 0.145 30.805);
--destructive: oklch(0.592 0.173 42.814);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.951 0.021 352.203);
--chart-1: oklch(0.951 0.021 352.203);
--chart-2: oklch(0.954 0.027 329.464);
--chart-3: oklch(0.953 0.017 26.566);
--chart-4: oklch(0.982 0.011 329.262);
--chart-5: oklch(0.951 0.022 352.23);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.125 0.014 351.371);
--foreground: oklch(0.991 0.002 351.643);
--muted: oklch(0.261 0.061 331.639);
--muted-foreground: oklch(0.78 0.032 329.603);
--popover: oklch(0.125 0.014 351.371);
--popover-foreground: oklch(0.991 0.002 351.643);
--card: oklch(0.138 0.016 352.68);
--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.951 0.021 352.203);
--primary-foreground: oklch(0.449 0.159 3.766);
--secondary: oklch(0.954 0.027 329.464);
--secondary-foreground: oklch(0.475 0.191 333.645);
--accent: oklch(0.953 0.017 26.566);
--accent-foreground: oklch(0.453 0.145 30.805);
--destructive: oklch(0.718 0.17 47.354);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.951 0.021 352.203);
--chart-1: oklch(0.951 0.021 352.203);
--chart-2: oklch(0.954 0.027 329.464);
--chart-3: oklch(0.953 0.017 26.566);
--chart-4: oklch(0.982 0.011 329.262);
--chart-5: oklch(0.951 0.022 352.23);
}