Insomnia for shadcn/ui

Insomnia is a shadcn/ui theme built around a neutral gray primary color (#c9cac9) with muted light green accents (#d0ddd3). The light mode uses a neutral background (#fbfefc). Dark mode keeps the neutral gray primary (#c9cac9) on a neutral background (#030704).

Color palette

TokenLightDark
Background
#fbfefcwhite
#030704black
Foreground
#040c05black
#f9fbf9mintcream
Card
#f7fdf8mintcream
#050a06black
Card foreground
#020804black
#fcfdfcwhite
Popover
#f7fdf8mintcream
#050a06black
Popover foreground
#020804black
#fcfdfcwhite
Primary
#c9cac9silver
#c9cac9silver
Primary foreground
#303130darkslategray
#303130darkslategray
Secondary
#d0ddd3lightgrey
#282a28darkslategray
Secondary foreground
#334738darkslategray
#c1c3c1silver
Muted
#e6f4eahoneydew
#0b190eblack
Muted foreground
#434c45darkslategray
#b3bcb5silver
Accent
#d0ddd3lightgrey
#282a28darkslategray
Accent foreground
#334738darkslategray
#c1c3c1silver
Destructive
#641e02maroon
#fc6b31tomato
Destructive foreground
#fdb79bburlywood
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#c9cac9silver
#c9cac9silver

Contrast

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

Light mode
Text on background19.49:1AAA
Text on card19.55:1AAA
Primary button7.94:1AAA
Secondary button7.10:1AAA
Muted text7.84:1AAA
Accent7.10:1AAA
Destructive7.18:1AAA
Dark mode
Text on background19.49:1AAA
Text on card19.54:1AAA
Primary button7.94:1AAA
Secondary button8.18:1AAA
Muted text9.31:1AAA
Accent8.18:1AAA
Destructive7.26:1AAA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.994 0.004 153.176);
  --foreground: oklch(0.14 0.022 152.431);
  --muted: oklch(0.954 0.02 152.897);
  --muted-foreground: oklch(0.405 0.015 152.601);
  --popover: oklch(0.988 0.008 153.11);
  --popover-foreground: oklch(0.122 0.019 152.537);
  --card: oklch(0.988 0.008 153.11);
  --card-foreground: oklch(0.122 0.019 152.537);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.838 0.002 153.209);
  --primary-foreground: oklch(0.312 0.002 153.142);
  --secondary: oklch(0.884 0.019 152.876);
  --secondary-foreground: oklch(0.376 0.036 151.576);
  --accent: oklch(0.884 0.019 152.876);
  --accent-foreground: oklch(0.376 0.036 151.576);
  --destructive: oklch(0.343 0.108 39.015);
  --destructive-foreground: oklch(0.838 0.091 42.472);
  --ring: oklch(0.838 0.002 153.209);
  --chart-1: oklch(0.838 0.002 153.209);
  --chart-2: oklch(0.884 0.019 152.876);
  --chart-3: oklch(0.884 0.019 152.876);
  --chart-4: oklch(0.906 0.016 152.954);
  --chart-5: oklch(0.84 0.006 153.114);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.12 0.012 152.793);
  --foreground: oklch(0.986 0.004 153.182);
  --muted: oklch(0.195 0.028 150.53);
  --muted-foreground: oklch(0.786 0.013 152.965);
  --popover: oklch(0.137 0.014 152.793);
  --popover-foreground: oklch(0.993 0.002 153.211);
  --card: oklch(0.137 0.014 152.793);
  --card-foreground: oklch(0.993 0.002 153.211);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.838 0.002 153.209);
  --primary-foreground: oklch(0.312 0.002 153.142);
  --secondary: oklch(0.281 0.003 153.051);
  --secondary-foreground: oklch(0.815 0.004 153.166);
  --accent: oklch(0.281 0.003 153.051);
  --accent-foreground: oklch(0.815 0.004 153.166);
  --destructive: oklch(0.699 0.191 40.189);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.838 0.002 153.209);
  --chart-1: oklch(0.838 0.002 153.209);
  --chart-2: oklch(0.281 0.003 153.051);
  --chart-3: oklch(0.281 0.003 153.051);
  --chart-4: oklch(0.312 0.004 153.043);
  --chart-5: oklch(0.84 0.006 153.114);
}