Cloak for shadcn/ui

Cloak is a shadcn/ui theme built around a deep blue primary color (#0a111f) with deep indigo accents (#0e0a1f). The light mode uses a neutral background (#ffffff). Dark mode keeps the deep blue primary (#0a111f) on a neutral background (#020203).

Color palette

TokenLightDark
Background
#ffffffwhite
#020203black
Foreground
#010204black
#ffffffwhite
Card
#fcfcfcsnow
#030407black
Card foreground
#000000black
#ffffffwhite
Popover
#fcfcfcsnow
#030407black
Popover foreground
#000000black
#ffffffwhite
Primary
#0a111fblack
#0a111fblack
Primary foreground
#859ed6cornflowerblue
#859ed6cornflowerblue
Secondary
#0a1b1fblack
#0a1b1fblack
Secondary foreground
#85c7d6skyblue
#85c7d6skyblue
Muted
#e9f0f2lavender
#0d1516black
Muted foreground
#585a5adimgray
#a5a6a7darkgray
Accent
#0e0a1fblack
#0e0a1fblack
Accent foreground
#9485d6mediumpurple
#9485d6mediumpurple
Destructive
#c63815firebrick
#ea5c39tomato
Destructive foreground
#ffffffwhite
#000000black
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#0a111fblack
#0a111fblack

Contrast

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

Light mode
Text on background20.75:1AAA
Text on card20.54:1AAA
Primary button7.07:1AAA
Secondary button9.37:1AAA
Muted text6.01:1AA
Accent6.08:1AA
Destructive5.25:1AA
Dark mode
Text on background20.72:1AAA
Text on card20.45:1AAA
Primary button7.07:1AAA
Secondary button9.37:1AAA
Muted text7.58:1AAA
Accent6.08:1AA
Destructive6.09:1AA

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(1 0 180);
  --foreground: oklch(0.083 0.013 256.706);
  --muted: oklch(0.95 0.008 212.67);
  --muted-foreground: oklch(0.466 0.002 212.664);
  --popover: oklch(0.992 0 161.565);
  --popover-foreground: oklch(0 0 0);
  --card: oklch(0.992 0 161.565);
  --card-foreground: oklch(0 0 0);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.178 0.031 264.553);
  --primary-foreground: oklch(0.702 0.087 265.048);
  --secondary: oklch(0.209 0.024 213.918);
  --secondary-foreground: oklch(0.791 0.071 213.354);
  --accent: oklch(0.164 0.042 289.391);
  --accent-foreground: oklch(0.662 0.12 291.184);
  --destructive: oklch(0.552 0.184 34.301);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.178 0.031 264.553);
  --chart-1: oklch(0.178 0.031 264.553);
  --chart-2: oklch(0.209 0.024 213.918);
  --chart-3: oklch(0.164 0.042 289.391);
  --chart-4: oklch(0.248 0.03 214.235);
  --chart-5: oklch(0.177 0.033 264.426);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.087 0.007 261.281);
  --foreground: oklch(1 0 180);
  --muted: oklch(0.188 0.012 212.98);
  --muted-foreground: oklch(0.725 0.002 212.663);
  --popover: oklch(0.11 0.009 261.281);
  --popover-foreground: oklch(1 0 180);
  --card: oklch(0.11 0.009 261.281);
  --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.178 0.031 264.553);
  --primary-foreground: oklch(0.702 0.087 265.048);
  --secondary: oklch(0.209 0.024 213.918);
  --secondary-foreground: oklch(0.791 0.071 213.354);
  --accent: oklch(0.164 0.042 289.391);
  --accent-foreground: oklch(0.662 0.12 291.184);
  --destructive: oklch(0.654 0.183 35.131);
  --destructive-foreground: oklch(0 0 0);
  --ring: oklch(0.178 0.031 264.553);
  --chart-1: oklch(0.178 0.031 264.553);
  --chart-2: oklch(0.209 0.024 213.918);
  --chart-3: oklch(0.164 0.042 289.391);
  --chart-4: oklch(0.248 0.03 214.235);
  --chart-5: oklch(0.177 0.033 264.426);
}