Hospitalization is a shadcn/ui theme built around a purple primary color (#af7cbb) with purple accents (#bb7ca8). The light mode uses a neutral background (#fdfbfe). Dark mode keeps the purple primary (#af7cbb) on a purple-tinted background (#0e0410).
| Token | Light | Dark |
|---|---|---|
| Background | #fdfbfewhite | #0e0410black |
| Foreground | #0f0312black | #fdfcfdwhite |
| Card | #fdfbfewhite | #0e0410black |
| Card foreground | #0f0312black | #fdfcfdwhite |
| Popover | #fdfbfewhite | #0e0410black |
| Popover foreground | #0f0312black | #fdfcfdwhite |
| Primary | #af7cbbmediumpurple | #af7cbbmediumpurple |
| Primary foreground | #030203black | #030203black |
| Secondary | #8f7cbbmediumpurple | #8f7cbbmediumpurple |
| Secondary foreground | #000000black | #000000black |
| Muted | #f0eef7whitesmoke | #0b0811black |
| Muted foreground | #3e3c44darkslategray | #bebbc3silver |
| Accent | #bb7ca8rosybrown | #bb7ca8rosybrown |
| Accent foreground | #030203black | #030203black |
| Destructive | #940505darkred | #f83030crimson |
| Destructive foreground | #fdcecepink | #ffffffwhite |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #af7cbbmediumpurple | #af7cbbmediumpurple |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.62:1 | AAA |
| Text on card | 19.62:1 | AAA |
| Primary button | 6.31:1 | AA |
| Secondary button | 5.75:1 | AA |
| Muted text | 9.44:1 | AAA |
| Accent | 6.46:1 | AA |
| Destructive | 6.53:1 | AA |
| Text on background | 19.65:1 | AAA |
| Text on card | 19.65:1 | AAA |
| Primary button | 6.31:1 | AA |
| Secondary button | 5.75:1 | AA |
| Muted text | 10.47:1 | AAA |
| Accent | 6.46:1 | AA |
| Destructive | 3.85:1 | AA Large |
Paste this into your globals.css to use Hospitalization in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(0.991 0.003 319.445);
--foreground: oklch(0.131 0.043 320.585);
--muted: oklch(0.953 0.012 299.823);
--muted-foreground: oklch(0.361 0.013 299.415);
--popover: oklch(0.991 0.003 319.445);
--popover-foreground: oklch(0.131 0.043 320.585);
--card: oklch(0.991 0.003 319.445);
--card-foreground: oklch(0.131 0.043 320.585);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.659 0.108 319.45);
--primary-foreground: oklch(0.088 0.011 320.491);
--secondary: oklch(0.628 0.096 297.354);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.665 0.098 338.459);
--accent-foreground: oklch(0.088 0.01 336.162);
--destructive: oklch(0.42 0.169 28.794);
--destructive-foreground: oklch(0.892 0.054 18.209);
--ring: oklch(0.659 0.108 319.45);
--chart-1: oklch(0.659 0.108 319.45);
--chart-2: oklch(0.628 0.096 297.354);
--chart-3: oklch(0.665 0.098 338.459);
--chart-4: oklch(0.657 0.088 297.715);
--chart-5: oklch(0.657 0.118 319.441);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.134 0.034 320.309);
--foreground: oklch(0.992 0.001 319.445);
--muted: oklch(0.145 0.02 298.01);
--muted-foreground: oklch(0.798 0.011 299.807);
--popover: oklch(0.134 0.034 320.309);
--popover-foreground: oklch(0.992 0.001 319.445);
--card: oklch(0.134 0.034 320.309);
--card-foreground: oklch(0.992 0.001 319.445);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.659 0.108 319.45);
--primary-foreground: oklch(0.088 0.011 320.491);
--secondary: oklch(0.628 0.096 297.354);
--secondary-foreground: oklch(0 0 0);
--accent: oklch(0.665 0.098 338.459);
--accent-foreground: oklch(0.088 0.01 336.162);
--destructive: oklch(0.634 0.232 27.036);
--destructive-foreground: oklch(1 0 180);
--ring: oklch(0.659 0.108 319.45);
--chart-1: oklch(0.659 0.108 319.45);
--chart-2: oklch(0.628 0.096 297.354);
--chart-3: oklch(0.665 0.098 338.459);
--chart-4: oklch(0.657 0.088 297.715);
--chart-5: oklch(0.657 0.118 319.441);
}