Hostel for shadcn/ui

Hostel is a shadcn/ui theme built around a vivid deep blue primary color (#072746) with muted light blue accents (#c2c7cb). The light mode uses a neutral background (#f7fafd). Dark mode keeps the vivid deep blue primary (#072746) on a neutral background (#020304).

Color palette

TokenLightDark
Background
#f7fafdghostwhite
#020304black
Foreground
#04080cblack
#ffffffwhite
Card
#f7fafdghostwhite
#020304black
Card foreground
#04080cblack
#ffffffwhite
Popover
#f7fafdghostwhite
#020304black
Popover foreground
#04080cblack
#ffffffwhite
Primary
#072746midnightblue
#072746midnightblue
Primary foreground
#8bc1f4lightskyblue
#8bc1f4lightskyblue
Secondary
#e0e0e1gainsboro
#21262cdarkslategray
Secondary foreground
#474748darkslategray
#b6c0c9silver
Muted
#eaf0f5lavender
#0a0f15black
Muted foreground
#474f57darkslategray
#a8b0b8darkgray
Accent
#c2c7cbsilver
#303e4bdarkslategray
Accent foreground
#2a2e32darkslategray
#cdd6dflightgrey
Destructive
#660000maroon
#ff2e2ecrimson
Destructive foreground
#ff9999lightsalmon
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#072746midnightblue
#072746midnightblue

Contrast

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

Light mode
Text on background19.17:1AAA
Text on card19.17:1AAA
Primary button7.93:1AAA
Secondary button7.05:1AAA
Muted text7.24:1AAA
Accent8.04:1AAA
Destructive6.56:1AA
Dark mode
Text on background20.69:1AAA
Text on card20.69:1AAA
Primary button7.93:1AAA
Secondary button8.22:1AAA
Muted text8.74:1AAA
Accent7.49:1AAA
Destructive3.69:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.984 0.005 246.029);
  --foreground: oklch(0.129 0.013 239.274);
  --muted: oklch(0.952 0.009 246.077);
  --muted-foreground: oklch(0.424 0.016 246.408);
  --popover: oklch(0.984 0.005 246.029);
  --popover-foreground: oklch(0.129 0.013 239.274);
  --card: oklch(0.984 0.005 246.029);
  --card-foreground: oklch(0.129 0.013 239.274);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.269 0.067 250.669);
  --primary-foreground: oklch(0.792 0.092 247.395);
  --secondary: oklch(0.908 0.001 245.973);
  --secondary-foreground: oklch(0.399 0.002 246.01);
  --accent: oklch(0.827 0.008 246.077);
  --accent-foreground: oklch(0.299 0.008 246.286);
  --destructive: oklch(0.32 0.131 29.234);
  --destructive-foreground: oklch(0.788 0.123 20.186);
  --ring: oklch(0.269 0.067 250.669);
  --chart-1: oklch(0.269 0.067 250.669);
  --chart-2: oklch(0.908 0.001 245.973);
  --chart-3: oklch(0.827 0.008 246.077);
  --chart-4: oklch(0.931 0 245.971);
  --chart-5: oklch(0.27 0.07 250.845);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.09 0.007 240.65);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.167 0.014 246.953);
  --muted-foreground: oklch(0.754 0.014 246.184);
  --popover: oklch(0.09 0.007 240.65);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.09 0.007 240.65);
  --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.269 0.067 250.669);
  --primary-foreground: oklch(0.792 0.092 247.395);
  --secondary: oklch(0.267 0.013 246.539);
  --secondary-foreground: oklch(0.802 0.017 246.21);
  --accent: oklch(0.356 0.029 246.921);
  --accent-foreground: oklch(0.873 0.016 246.172);
  --destructive: oklch(0.645 0.24 27.317);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.269 0.067 250.669);
  --chart-1: oklch(0.269 0.067 250.669);
  --chart-2: oklch(0.267 0.013 246.539);
  --chart-3: oklch(0.356 0.029 246.921);
  --chart-4: oklch(0.298 0.016 246.566);
  --chart-5: oklch(0.27 0.07 250.845);
}