#040E39#040E39

#040E39 is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 19.1% C 0.085 H 266.2°. Best body text is #FFFFFF at 18.63:1 contrast (WCAG AA passes).

Color values

HEX#040E39
RGBrgb(4, 14, 57)
HSLhsl(229, 87%, 12%)
HSVhsv(229, 93%, 22%)
CMYKcmyk(93%, 75.4%, 0%, 77.6%)
CIE-LABlab(5.74, 13.83, -28.69)
CIE-LCHlch(5.74, 31.85, 295.74°)
OKLaboklab(19.1% -0.0056 -0.0844)
OKLCHoklch(19.1% 0.085 266.2)
XYZxyz(0.9454, 0.6352, 3.9429)
Luminance0.0063 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040E39 #392F04
analogous
#042939 #040E39 #150439
triadic
#040E39 #39040E #0E3904
tetradic
#040E39 #390429 #392F04 #043915
square
#040E39 #390429 #392F04 #043915
split-complementary
#040E39 #391504 #293904
monochromatic
#02071D #02071D #040E39 #081C72 #0C2AAB

Accessibility & contrast

On white

18.63
#040E39 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.13
#040E39 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040E39
18.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040E39#FFFFFF#000000##FFFFFF
##040E391.0018.631.1318.63
#FFFFFF18.631.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00153A
Deuteranopia (green-blind)
#001038
Tritanopia (blue-blind)
#001A21
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040e39;
/* rgb */ color: rgb(4, 14, 57);
/* oklch */ color: oklch(19.1% 0.085 266.2);
Tailwind
colors: {
  custom: {
    50: '#4e4c70',
    500: '#040e39',
    950: '#000000',
  },
}
SCSS
$custom: #040e39;
$custom-light: #4e4c70;
$custom-dark: #000000;
JSON
{
  "hex": "#040e39",
  "rgb": {
    "r": 4,
    "g": 14,
    "b": 57
  },
  "hsl": {
    "h": 228.679,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.19098,
    "c": 0.08456,
    "h": 266.2
  },
  "luminance": 0.00635
}

Semantic roles & 50–950 ramp

primary
#040E39
secondary
#7B691E
accent
#D52BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040E39

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#040E39 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva