#040F39#040F39

#040F39 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 19.3% C 0.083 H 265.7°. Best body text is #FFFFFF at 18.54:1 contrast (WCAG AA passes).

Color values

HEX#040F39
RGBrgb(4, 15, 57)
HSLhsl(228, 87%, 12%)
HSVhsv(228, 93%, 22%)
CMYKcmyk(93%, 73.7%, 0%, 77.6%)
CIE-LABlab(5.99, 13.28, -28.29)
CIE-LCHlch(5.99, 31.25, 295.15°)
OKLaboklab(19.32% -0.0062 -0.0829)
OKLCHoklch(19.32% 0.083 265.7)
XYZxyz(0.9592, 0.6628, 3.9475)
Luminance0.0066 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F39 #392E04
analogous
#042A39 #040F39 #140439
triadic
#040F39 #39040F #0F3904
tetradic
#040F39 #39042A #392E04 #043914
square
#040F39 #39042A #392E04 #043914
split-complementary
#040F39 #391404 #2A3904
monochromatic
#02081D #02081D #040F39 #081E72 #0C2DAB

Accessibility & contrast

On white

18.54
#040F39 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F39
18.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F39#FFFFFF#000000##FFFFFF
##040F391.0018.541.1318.54
#FFFFFF18.541.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00163A
Deuteranopia (green-blind)
#001138
Tritanopia (blue-blind)
#001A22
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040f39;
/* rgb */ color: rgb(4, 15, 57);
/* oklch */ color: oklch(19.3% 0.083 265.7);
Tailwind
colors: {
  custom: {
    50: '#4e4d70',
    500: '#040f39',
    950: '#000000',
  },
}
SCSS
$custom: #040f39;
$custom-light: #4e4d70;
$custom-dark: #000000;
JSON
{
  "hex": "#040f39",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 57
  },
  "hsl": {
    "h": 227.547,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.19324,
    "c": 0.08312,
    "h": 265.7
  },
  "luminance": 0.00663
}

Semantic roles & 50–950 ramp

primary
#040F39
secondary
#7B681E
accent
#D12BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040F39

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

Preview Lab → · Contrast checker → · Palette generator →

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