#040F36#040F36

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

Color values

HEX#040F36
RGBrgb(4, 15, 54)
HSLhsl(227, 86%, 11%)
HSVhsv(227, 93%, 21%)
CMYKcmyk(92.6%, 72.2%, 0%, 78.8%)
CIE-LABlab(5.72, 11.61, -26.53)
CIE-LCHlch(5.72, 28.96, 293.64°)
OKLaboklab(18.99% -0.0062 -0.078)
OKLCHoklch(18.99% 0.078 265.5)
XYZxyz(0.8865, 0.6337, 3.5649)
Luminance0.0063 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F36 #362B04
analogous
#042836 #040F36 #120436
triadic
#040F36 #36040F #0F3604
tetradic
#040F36 #360428 #362B04 #043612
square
#040F36 #360428 #362B04 #043612
split-complementary
#040F36 #361204 #283604
monochromatic
#02081C #02081C #040F36 #081F6F #0C2FA8

Accessibility & contrast

On white

18.64
#040F36 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F36
18.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F36#FFFFFF#000000##FFFFFF
##040F361.0018.641.1318.64
#FFFFFF18.641.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001537
Deuteranopia (green-blind)
#001035
Tritanopia (blue-blind)
#001920
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040f36;
/* rgb */ color: rgb(4, 15, 54);
/* oklch */ color: oklch(19.0% 0.078 265.5);
Tailwind
colors: {
  custom: {
    50: '#4d4d6d',
    500: '#040f36',
    950: '#000000',
  },
}
SCSS
$custom: #040f36;
$custom-light: #4d4d6d;
$custom-dark: #000000;
JSON
{
  "hex": "#040f36",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 54
  },
  "hsl": {
    "h": 226.8,
    "s": 86.207,
    "l": 11.373
  },
  "oklch": {
    "l": 0.18985,
    "c": 0.07829,
    "h": 265.5
  },
  "luminance": 0.00634
}

Semantic roles & 50–950 ramp

primary
#040F36
secondary
#78641E
accent
#CE2BFC
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#020107
muted
#78777A

Preview Lab

Preview with #040F36

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

Preview Lab → · Contrast checker → · Palette generator →

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