#040F38#040F38

#040F38 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 19.2% C 0.082 H 265.6°. Best body text is #FFFFFF at 18.57:1 contrast (WCAG AA passes).

Color values

HEX#040F38
RGBrgb(4, 15, 56)
HSLhsl(227, 87%, 12%)
HSVhsv(227, 93%, 22%)
CMYKcmyk(92.9%, 73.2%, 0%, 78%)
CIE-LABlab(5.90, 12.73, -27.70)
CIE-LCHlch(5.90, 30.49, 294.68°)
OKLaboklab(19.21% -0.0062 -0.0813)
OKLCHoklch(19.21% 0.082 265.6)
XYZxyz(0.9345, 0.6529, 3.8174)
Luminance0.0065 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F38 #382D04
analogous
#042938 #040F38 #130438
triadic
#040F38 #38040F #0F3804
tetradic
#040F38 #380429 #382D04 #043813
square
#040F38 #380429 #382D04 #043813
split-complementary
#040F38 #381304 #293804
monochromatic
#02081D #02081D #040F38 #081E71 #0C2EAA

Accessibility & contrast

On white

18.57
#040F38 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F38
18.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F38#FFFFFF#000000##FFFFFF
##040F381.0018.571.1318.57
#FFFFFF18.571.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001639
Deuteranopia (green-blind)
#001137
Tritanopia (blue-blind)
#001A21
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040f38;
/* rgb */ color: rgb(4, 15, 56);
/* oklch */ color: oklch(19.2% 0.082 265.6);
Tailwind
colors: {
  custom: {
    50: '#4e4d6f',
    500: '#040f38',
    950: '#000000',
  },
}
SCSS
$custom: #040f38;
$custom-light: #4e4d6f;
$custom-dark: #000000;
JSON
{
  "hex": "#040f38",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 56
  },
  "hsl": {
    "h": 227.308,
    "s": 86.667,
    "l": 11.765
  },
  "oklch": {
    "l": 0.1921,
    "c": 0.08152,
    "h": 265.6
  },
  "luminance": 0.00653
}

Semantic roles & 50–950 ramp

primary
#040F38
secondary
#7A661E
accent
#D02BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040F38

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

Preview Lab → · Contrast checker → · Palette generator →

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