Rehospitalisation for shadcn/ui

Rehospitalisation is a shadcn/ui theme built around a blue primary color (#7382dd) with green accents (#82dd73). The light mode uses a neutral background (#fbfcfe). Dark mode keeps the blue primary (#7382dd) on a neutral background (#020308).

Color palette

TokenLightDark
Background
#fbfcfewhite
#020308black
Foreground
#010204black
#f6f7f8whitesmoke
Card
#fbfcfewhite
#020308black
Card foreground
#010204black
#f6f7f8whitesmoke
Popover
#fbfcfewhite
#020308black
Popover foreground
#010204black
#f6f7f8whitesmoke
Primary
#7382ddcornflowerblue
#7382ddcornflowerblue
Primary foreground
#000000black
#000000black
Secondary
#dd7382palevioletred
#dd7382palevioletred
Secondary foreground
#190608black
#190608black
Muted
#f2edeewhitesmoke
#120d0eblack
Muted foreground
#5f4e50dimgray
#b1a0a2darkgray
Accent
#82dd73lightgreen
#82dd73lightgreen
Accent foreground
#081906black
#081906black
Destructive
#de4c02orangered
#fd6e26tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#7382ddcornflowerblue
#7382ddcornflowerblue

Contrast

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

Light mode
Text on background20.17:1AAA
Text on card20.17:1AAA
Primary button5.94:1AA
Secondary button6.41:1AA
Muted text6.74:1AA
Accent10.89:1AAA
Destructive4.09:1AA Large
Dark mode
Text on background19.18:1AAA
Text on card19.18:1AAA
Primary button5.94:1AA
Secondary button6.41:1AA
Muted text7.73:1AAA
Accent10.89:1AAA
Destructive7.40:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.99 0.003 279.301);
  --foreground: oklch(0.08 0.013 273.65);
  --muted: oklch(0.951 0.005 7.878);
  --muted-foreground: oklch(0.442 0.024 9.039);
  --popover: oklch(0.99 0.003 279.301);
  --popover-foreground: oklch(0.08 0.013 273.65);
  --card: oklch(0.99 0.003 279.301);
  --card-foreground: oklch(0.08 0.013 273.65);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.635 0.138 275.166);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.681 0.132 12.801);
  --secondary-foreground: oklch(0.156 0.035 12.209);
  --accent: oklch(0.817 0.167 141.098);
  --accent-foreground: oklch(0.191 0.043 140.585);
  --destructive: oklch(0.612 0.194 39.384);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.635 0.138 275.166);
  --chart-1: oklch(0.635 0.138 275.166);
  --chart-2: oklch(0.681 0.132 12.801);
  --chart-3: oklch(0.817 0.167 141.098);
  --chart-4: oklch(0.707 0.119 12.052);
  --chart-5: oklch(0.631 0.145 274.885);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.101 0.016 273.65);
  --foreground: oklch(0.975 0.002 279.305);
  --muted: oklch(0.165 0.008 8.916);
  --muted-foreground: oklch(0.72 0.021 8.443);
  --popover: oklch(0.101 0.016 273.65);
  --popover-foreground: oklch(0.975 0.002 279.305);
  --card: oklch(0.101 0.016 273.65);
  --card-foreground: oklch(0.975 0.002 279.305);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.635 0.138 275.166);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.681 0.132 12.801);
  --secondary-foreground: oklch(0.156 0.035 12.209);
  --accent: oklch(0.817 0.167 141.098);
  --accent-foreground: oklch(0.191 0.043 140.585);
  --destructive: oklch(0.704 0.192 43.051);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.635 0.138 275.166);
  --chart-1: oklch(0.635 0.138 275.166);
  --chart-2: oklch(0.681 0.132 12.801);
  --chart-3: oklch(0.817 0.167 141.098);
  --chart-4: oklch(0.707 0.119 12.052);
  --chart-5: oklch(0.631 0.145 274.885);
}