Colorise ProOKLCH Engine
ExploreStudioNamesPickerPairs
ExploreStudioNamesPickerPairsContrastExtract
Menu

Product

  • Home
  • Explore
  • Studio
  • Color Names

Tools

  • Picker
  • Color Pairs
  • Contrast
  • Image Extract
  • Gradient Lab
  • Palette Diff
  • Brand from URL

Guides

  • All guides
  • OKLCH vs HSL
  • WCAG vs APCA
  • OKLCH color scales
  • Gamut & sRGB
  • Extract from images
  • HEX to OKLCH
  • Dark mode colors
  • Color meanings
Home/Colors/#040D1A

Nearest named color · #040D1A

#040D1A

Nearest named color: Midnight Edition

#040D1A (rgb(4 13 26), hsl(215 73% 6%), oklch(0.157 0.032 254.5)) is closest to the named color Midnight Edition. See tints, shades, harmonies, WCAG & APCA contrast, and CSS, Tailwind v4 & SCSS code.

What does Gray mean? →

#040D1A

oklch(0.157 0.032 254.5)

Color conversions

HEX
#040d1a
RGB
rgb(4 13 26)
HSL
hsl(215 73% 6%)
HWB
hwb(215 2% 90%)
OKLCH
oklch(0.157 0.032 254.5)
OKLab
oklab(0.157 -0.009 -0.031)
CIE Lab
lab(3.42 -0.36 -8.78)
LCH
lch(3.42 8.79 267.7)
CMYK
cmyk(85% 50% 0% 90%)

Tints · Shades · Tones

Tints

  • 16202D
  • 2B3541
  • 424B57
  • 5A626D
  • 747B83
  • 8E949B
  • A9ADB3
  • C5C8CC
  • E2E3E5

Shades

  • 030A15
  • 020710
  • 01050C
  • 010307
  • 000204
  • 000102
  • 000001
  • 000000
  • 000000

Tones

  • 0D1723
  • 18212D
  • 242C36
  • 303740
  • 3C434B
  • 494E55
  • 565A5F
  • 64676A
  • 727375

Color harmonies

Complementary +180°

  • 040D1A

    Midnight Edition

  • 150A00

    ≈ Asphalt

Analogous -30° +30°

  • 040D1A

    Midnight Edition

  • 000F16

    ≈ Black Glaze

  • 0B0A1A

    ≈ Tristesse

Triadic +120° +240°

  • 040D1A

    Midnight Edition

  • 180708

    ≈ Asphalt

  • 071003

    ≈ Memorial Black

Split-complementary +150° +210°

  • 040D1A

    Midnight Edition

  • 180803

    ≈ Soy Sauce

  • 0F0D00

    ≈ Chinese Black

Tetradic +90° +180° +270°

  • 040D1A

    Midnight Edition

  • 160710

    ≈ Noir Fiction

  • 150A00

    ≈ Asphalt

  • 001109

    ≈ Jedi Night

Contrast & accessibility

Ag

On white

WCAG 19.48:1 · APCA Lc 106

AAA
Ag

On black

WCAG 1.07:1 · APCA Lc 0

Fail

Best text color: #FFFFFF

WCAG 19.48:1 (AAA) · APCA Lc 106

Contrast pairs

  • #040D1A / #FFFFFF
  • #040D1A / #000000
  • #FFFFFF / #040D1A
  • #000000 / #040D1A

Code snippets

CSS

:root {
  --midnight-edition: #040d1a;
  --midnight-edition-rgb: 4 13 26;
  --midnight-edition-oklch: oklch(0.157 0.032 254.5);
}

.element {
  color: var(--midnight-edition);
  background-color: hsl(215 73% 6%);
  border-color: oklch(0.157 0.032 254.5);
}

Tailwind CSS v4

@theme {
  --color-midnight-edition: #040d1a;
  --color-midnight-edition-50: #eff6ff;
  --color-midnight-edition-100: #e1e9f3;
  --color-midnight-edition-200: #ccd5e2;
  --color-midnight-edition-300: #adb8c8;
  --color-midnight-edition-400: #92a0b2;
  --color-midnight-edition-500: #78889c;
  --color-midnight-edition-600: #667383;
  --color-midnight-edition-700: #515c69;
  --color-midnight-edition-800: #3b434d;
  --color-midnight-edition-900: #282e36;
  --color-midnight-edition-950: #161b21;
}

SCSS

$midnight-edition: #040d1a;
$midnight-edition-rgb: 4, 13, 26;
$midnight-edition-light: mix(#fff, $midnight-edition, 20%);
$midnight-edition-dark: mix(#000, $midnight-edition, 20%);

.element {
  color: $midnight-edition;
  box-shadow: 0 0 0 2px rgba($midnight-edition, 0.35);
}

Similar named colors

  • 060B14

    Dark Rift

  • 0B0F1A

    Nyctophobia

  • 0B0C14

    Midnight Oil

  • 010B13

    Black Knight

  • 0C0C1F

    Tristesse

  • 001122

    Kuretake Black Manga

  • 080813

    Narwhal Grey

  • 01081C

    Melanophobia

  • 050D25

    Void

  • 0C121B

    Midnight Edition

  • 070D0D

    Dark Side of the Moon

  • 090615

    Not Tonight

Palettes with this color

  • True Into the Blue BloomViolet · Cold
  • Pure Song of the Sea BriefViolet · Cold

Palettes with similar colors

  • True Wing Commander KilnViolet · Cold
  • Neon Deep Sky Blue CircuitViolet · Cold
  • Classic Reading Tea Leaves BriefRed · Gray
  • Mediterranean Blue PulseViolet · Cold
  • Classic Sail On PulseViolet · Cold
  • Pure Haddock’s Sweater DuneViolet · Cold

Open in tools

PickerPairsContrast checkerStudioJSON API
Colorise Pro

Free OKLCH color workspace: precision color picker, color pairs, WCAG & APCA contrast checker, palette from image, Studio systems, names, gradients, and brand tools. Export HEX, CSS, Tailwind & DTCG.

OKLCH Engine

Product

  • Home
  • Explore
  • Studio
  • Color Names
  • Color Codes

Tools

  • Color Picker
  • Color Pairs
  • Contrast Checker
  • Image Extract
  • Gradient Lab
  • Palette Diff
  • Brand from URL
  • For presentations
  • For business cards
  • For SaaS landings
  • Duo pairs
  • Trio systems

Guides

  • All guides
  • OKLCH vs HSL
  • WCAG vs APCA
  • OKLCH color scales
  • Gamut & sRGB
  • Extract from images
  • HEX to OKLCH
  • Dark mode colors
  • Color meanings

Legal

  • Privacy
  • Terms

© 2026 Colorise Pro. All rights reserved.

© 2026 Colorise Pro. Built for precision color work.

Report infringement: [email protected] (Colorise Pro)

PrivacyTermsOKLCH · WCAG · APCA