Black Ocean for shadcn/ui

Black Ocean is a shadcn/ui theme built around a neutral gray primary color (#dedede) with muted deep blue accents (#2f3841). The light mode uses a blue-tinted background (#0f1215). Dark mode keeps the neutral gray primary (#dedede) on a blue-tinted background (#0f1215).

Color palette

TokenLightDark
Background
#0f1215black
#0f1215black
Foreground
#dededegainsboro
#dededegainsboro
Card
#0b0d0fblack
#0b0d0fblack
Card foreground
#ebebeblinen
#ebebeblinen
Popover
#090a0cblack
#090a0cblack
Popover foreground
#f7f7f7whitesmoke
#f7f7f7whitesmoke
Primary
#dededegainsboro
#dededegainsboro
Primary foreground
#454545darkslategray
#454545darkslategray
Secondary
#404040darkslategray
#404040darkslategray
Secondary foreground
#d9d9d9gainsboro
#d9d9d9gainsboro
Muted
#22262bdarkslategray
#22262bdarkslategray
Muted foreground
#9ba6b0darkgray
#9ba6b0darkgray
Accent
#2f3841darkslategray
#2f3841darkslategray
Accent foreground
#cad1d8lightgrey
#cad1d8lightgrey
Destructive
#ec2222crimson
#ec2222crimson
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#1d1f20black
#1d1f20black
Input
#242629darkslategray
#242629darkslategray
Ring
#dededegainsboro
#dededegainsboro

Contrast

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

Light mode
Text on background13.98:1AAA
Text on card16.35:1AAA
Primary button7.11:1AAA
Secondary button7.37:1AAA
Muted text6.13:1AA
Accent7.71:1AAA
Destructive4.35:1AA Large
Dark mode
Text on background13.98:1AAA
Text on card16.35:1AAA
Primary button7.11:1AAA
Secondary button7.37:1AAA
Muted text6.13:1AA
Accent7.71:1AAA
Destructive4.35:1AA Large

CSS variables

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

:root {
  --radius: 0.5rem;
  --background: oklch(0.18 0.007 248.241);
  --foreground: oklch(0.9 0 188.746);
  --muted: oklch(0.267 0.011 248.233);
  --muted-foreground: oklch(0.719 0.02 248.103);
  --popover: oklch(0.145 0.005 247.047);
  --popover-foreground: oklch(0.977 0 180);
  --card: oklch(0.156 0.006 248.18);
  --card-foreground: oklch(0.939 0 180);
  --border: oklch(0.236 0.004 248.017);
  --input: oklch(0.268 0.005 248.03);
  --primary: oklch(0.9 0 188.746);
  --primary-foreground: oklch(0.39 0 165.964);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.336 0.02 248.42);
  --accent-foreground: oklch(0.858 0.013 247.979);
  --destructive: oklch(0.604 0.231 27.798);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.9 0 188.746);
  --chart-1: oklch(0.9 0 188.746);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.336 0.02 248.42);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.899 0.002 17.198);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.18 0.007 248.241);
  --foreground: oklch(0.9 0 188.746);
  --muted: oklch(0.267 0.011 248.233);
  --muted-foreground: oklch(0.719 0.02 248.103);
  --popover: oklch(0.145 0.005 247.047);
  --popover-foreground: oklch(0.977 0 180);
  --card: oklch(0.156 0.006 248.18);
  --card-foreground: oklch(0.939 0 180);
  --border: oklch(0.236 0.004 248.017);
  --input: oklch(0.268 0.005 248.03);
  --primary: oklch(0.9 0 188.746);
  --primary-foreground: oklch(0.39 0 165.964);
  --secondary: oklch(0.371 0 168.69);
  --secondary-foreground: oklch(0.885 0 180);
  --accent: oklch(0.336 0.02 248.42);
  --accent-foreground: oklch(0.858 0.013 247.979);
  --destructive: oklch(0.604 0.231 27.798);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.9 0 188.746);
  --chart-1: oklch(0.9 0 188.746);
  --chart-2: oklch(0.371 0 168.69);
  --chart-3: oklch(0.336 0.02 248.42);
  --chart-4: oklch(0.399 0 180);
  --chart-5: oklch(0.899 0.002 17.198);
}