#040F34#040F34

#040F34 is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 18.8% C 0.075 H 265.2°. Best body text is #FFFFFF at 18.70:1 contrast (WCAG AA passes).

Color values

HEX#040F34
RGBrgb(4, 15, 52)
HSLhsl(226, 86%, 11%)
HSVhsv(226, 92%, 20%)
CMYKcmyk(92.3%, 71.2%, 0%, 79.6%)
CIE-LABlab(5.56, 10.47, -25.33)
CIE-LCHlch(5.56, 27.41, 292.46°)
OKLaboklab(18.76% -0.0062 -0.0748)
OKLCHoklch(18.76% 0.075 265.2)
XYZxyz(0.8405, 0.6153, 3.3226)
Luminance0.0062 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F34 #342904
analogous
#042734 #040F34 #110434
triadic
#040F34 #34040F #0F3404
tetradic
#040F34 #340427 #342904 #043411
square
#040F34 #340427 #342904 #043411
split-complementary
#040F34 #341104 #273404
monochromatic
#02081C #02081C #040F34 #081F6D #0D30A6

Accessibility & contrast

On white

18.70
#040F34 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.12
#040F34 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040F34
18.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F34#FFFFFF#000000##FFFFFF
##040F341.0018.701.1218.70
#FFFFFF18.701.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001535
Deuteranopia (green-blind)
#001033
Tritanopia (blue-blind)
#00181F
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040f34;
/* rgb */ color: rgb(4, 15, 52);
/* oklch */ color: oklch(18.8% 0.075 265.2);
Tailwind
colors: {
  custom: {
    50: '#4c4d6c',
    500: '#040f34',
    950: '#000000',
  },
}
SCSS
$custom: #040f34;
$custom-light: #4c4d6c;
$custom-dark: #000000;
JSON
{
  "hex": "#040f34",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 52
  },
  "hsl": {
    "h": 226.25,
    "s": 85.714,
    "l": 10.98
  },
  "oklch": {
    "l": 0.18764,
    "c": 0.07502,
    "h": 265.2
  },
  "luminance": 0.00615
}

Semantic roles & 50–950 ramp

primary
#040F34
secondary
#76621E
accent
#CC2CFC
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010107
muted
#77777A

Preview Lab

Preview with #040F34

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

Preview Lab → · Contrast checker → · Palette generator →

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