#040F3B#040F3B

#040F3B is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 19.6% C 0.086 H 265.8°. Best body text is #FFFFFF at 18.48:1 contrast (WCAG AA passes).

Color values

HEX#040F3B
RGBrgb(4, 15, 59)
HSLhsl(228, 87%, 12%)
HSVhsv(228, 93%, 23%)
CMYKcmyk(93.2%, 74.6%, 0%, 76.9%)
CIE-LABlab(6.17, 14.36, -29.43)
CIE-LCHlch(6.17, 32.75, 296.01°)
OKLaboklab(19.55% -0.0063 -0.0861)
OKLCHoklch(19.55% 0.086 265.8)
XYZxyz(1.0100, 0.6831, 4.2154)
Luminance0.0068 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F3B #3B3004
analogous
#042B3B #040F3B #15043B
triadic
#040F3B #3B040F #0F3B04
tetradic
#040F3B #3B042B #3B3004 #043B15
square
#040F3B #3B042B #3B3004 #043B15
split-complementary
#040F3B #3B1504 #2B3B04
monochromatic
#02071D #02071D #040F3B #081E74 #0C2CAE

Accessibility & contrast

On white

18.48
#040F3B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.14
#040F3B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040F3B
18.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F3B#FFFFFF#000000##FFFFFF
##040F3B1.0018.481.1418.48
#FFFFFF18.481.0021.001.00
#0000001.1421.001.0021.00
##FFFFFF18.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00163C
Deuteranopia (green-blind)
#00113A
Tritanopia (blue-blind)
#001B23
Achromatopsia (no color)
#141414

Design tokens & code

CSS
--color: #040f3b;
/* rgb */ color: rgb(4, 15, 59);
/* oklch */ color: oklch(19.6% 0.086 265.8);
Tailwind
colors: {
  custom: {
    50: '#4f4d71',
    500: '#040f3b',
    950: '#000000',
  },
}
SCSS
$custom: #040f3b;
$custom-light: #4f4d71;
$custom-dark: #000000;
JSON
{
  "hex": "#040f3b",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 59
  },
  "hsl": {
    "h": 228,
    "s": 87.302,
    "l": 12.353
  },
  "oklch": {
    "l": 0.19554,
    "c": 0.08629,
    "h": 265.8
  },
  "luminance": 0.00683
}

Semantic roles & 50–950 ramp

primary
#040F3B
secondary
#7D6A1E
accent
#D32AFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020108
muted
#78777B

Preview Lab

Preview with #040F3B

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

Preview Lab → · Contrast checker → · Palette generator →

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