Hospitalisation for shadcn/ui

Hospitalisation is a shadcn/ui theme built around a light red primary color (#fbe0e6) with light blue accents (#e0e6fb). The light mode uses a neutral background (#ffffff). Dark mode keeps the light red primary (#fbe0e6) on a neutral background (#000000).

Color palette

TokenLightDark
Background
#ffffffwhite
#000000black
Foreground
#100407black
#fbf9f9snow
Card
#fcfcfcsnow
#030303black
Card foreground
#0c0305black
#fdfcfcsnow
Popover
#ffffffwhite
#000000black
Popover foreground
#100407black
#fbf9f9snow
Primary
#fbe0e6mistyrose
#fbe0e6mistyrose
Primary foreground
#931532brown
#931532brown
Secondary
#e6fbe0beige
#e6fbe0beige
Secondary foreground
#143a08darkgreen
#143a08darkgreen
Muted
#d7e2d4gainsboro
#202b1dblack
Muted foreground
#646963dimgray
#979c96darkgray
Accent
#e0e6fblavender
#e0e6fblavender
Accent foreground
#153293midnightblue
#153293midnightblue
Destructive
#d41402red
#fd3c2borangered
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#fbe0e6mistyrose
#fbe0e6mistyrose

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background20.14:1AAA
Text on card19.93:1AAA
Primary button7.04:1AAA
Secondary button11.70:1AAA
Muted text4.21:1AA Large
Accent8.83:1AAA
Destructive5.38:1AA
Dark mode
Text on background20.02:1AAA
Text on card20.19:1AAA
Primary button7.04:1AAA
Secondary button11.70:1AAA
Muted text5.28:1AA
Accent8.83:1AAA
Destructive3.58:1AA Large

CSS variables

Paste this into your globals.css to use Hospitalisation in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.133 0.026 2.497);
  --muted: oklch(0.902 0.022 138.356);
  --muted-foreground: oklch(0.515 0.011 138.353);
  --popover: oklch(1 0 180);
  --popover-foreground: oklch(0.133 0.026 2.497);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0.12 0.023 1.229);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.93 0.031 1.862);
  --primary-foreground: oklch(0.432 0.159 15.296);
  --secondary: oklch(0.965 0.041 138.377);
  --secondary-foreground: oklch(0.309 0.088 139.521);
  --accent: oklch(0.926 0.029 272.314);
  --accent-foreground: oklch(0.369 0.162 265.46);
  --destructive: oklch(0.552 0.219 30.097);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.93 0.031 1.862);
  --chart-1: oklch(0.93 0.031 1.862);
  --chart-2: oklch(0.965 0.041 138.377);
  --chart-3: oklch(0.926 0.029 272.314);
  --chart-4: oklch(0.98 0.024 138.355);
  --chart-5: oklch(0.929 0.032 1.898);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0 0 0);
  --foreground: oklch(0.983 0.003 1.034);
  --muted: oklch(0.273 0.03 138.478);
  --muted-foreground: oklch(0.687 0.01 138.346);
  --popover: oklch(0 0 0);
  --popover-foreground: oklch(0.983 0.003 1.034);
  --card: oklch(0.092 0 180);
  --card-foreground: oklch(0.992 0.001 0.997);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.93 0.031 1.862);
  --primary-foreground: oklch(0.432 0.159 15.296);
  --secondary: oklch(0.965 0.041 138.377);
  --secondary-foreground: oklch(0.309 0.088 139.521);
  --accent: oklch(0.926 0.029 272.314);
  --accent-foreground: oklch(0.369 0.162 265.46);
  --destructive: oklch(0.651 0.23 29.795);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.93 0.031 1.862);
  --chart-1: oklch(0.93 0.031 1.862);
  --chart-2: oklch(0.965 0.041 138.377);
  --chart-3: oklch(0.926 0.029 272.314);
  --chart-4: oklch(0.98 0.024 138.355);
  --chart-5: oklch(0.929 0.032 1.898);
}