#040F37#040F37

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

Color values

HEX#040F37
RGBrgb(4, 15, 55)
HSLhsl(227, 86%, 12%)
HSVhsv(227, 93%, 22%)
CMYKcmyk(92.7%, 72.7%, 0%, 78.4%)
CIE-LABlab(5.81, 12.17, -27.12)
CIE-LCHlch(5.81, 29.72, 294.17°)
OKLaboklab(19.1% -0.0062 -0.0797)
OKLCHoklch(19.1% 0.08 265.5)
XYZxyz(0.9102, 0.6432, 3.6899)
Luminance0.0064 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F37 #372C04
analogous
#042937 #040F37 #130437
triadic
#040F37 #37040F #0F3704
tetradic
#040F37 #370429 #372C04 #043713
square
#040F37 #370429 #372C04 #043713
split-complementary
#040F37 #371304 #293704
monochromatic
#02081D #02081D #040F37 #081F70 #0C2EA9

Accessibility & contrast

On white

18.61
#040F37 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F37
18.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F37#FFFFFF#000000##FFFFFF
##040F371.0018.611.1318.61
#FFFFFF18.611.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001538
Deuteranopia (green-blind)
#001036
Tritanopia (blue-blind)
#001921
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040f37;
/* rgb */ color: rgb(4, 15, 55);
/* oklch */ color: oklch(19.1% 0.080 265.5);
Tailwind
colors: {
  custom: {
    50: '#4e4d6e',
    500: '#040f37',
    950: '#000000',
  },
}
SCSS
$custom: #040f37;
$custom-light: #4e4d6e;
$custom-dark: #000000;
JSON
{
  "hex": "#040f37",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 55
  },
  "hsl": {
    "h": 227.059,
    "s": 86.441,
    "l": 11.569
  },
  "oklch": {
    "l": 0.19097,
    "c": 0.07991,
    "h": 265.5
  },
  "luminance": 0.00643
}

Semantic roles & 50–950 ramp

primary
#040F37
secondary
#79651E
accent
#CF2BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040F37

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

Preview Lab → · Contrast checker → · Palette generator →

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