#040F3A#040F3A

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

Color values

HEX#040F3A
RGBrgb(4, 15, 58)
HSLhsl(228, 87%, 12%)
HSVhsv(228, 93%, 23%)
CMYKcmyk(93.1%, 74.1%, 0%, 77.3%)
CIE-LABlab(6.08, 13.82, -28.86)
CIE-LCHlch(6.08, 32.00, 295.59°)
OKLaboklab(19.44% -0.0062 -0.0845)
OKLCHoklch(19.44% 0.085 265.8)
XYZxyz(0.9843, 0.6728, 4.0802)
Luminance0.0067 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F3A #3A2F04
analogous
#042A3A #040F3A #14043A
triadic
#040F3A #3A040F #0F3A04
tetradic
#040F3A #3A042A #3A2F04 #043A14
square
#040F3A #3A042A #3A2F04 #043A14
split-complementary
#040F3A #3A1404 #2A3A04
monochromatic
#02071D #02071D #040F3A #081E73 #0C2DAD

Accessibility & contrast

On white

18.51
#040F3A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F3A
18.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F3A#FFFFFF#000000##FFFFFF
##040F3A1.0018.511.1318.51
#FFFFFF18.511.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00163B
Deuteranopia (green-blind)
#001139
Tritanopia (blue-blind)
#001A22
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040f3a;
/* rgb */ color: rgb(4, 15, 58);
/* oklch */ color: oklch(19.4% 0.085 265.8);
Tailwind
colors: {
  custom: {
    50: '#4f4d71',
    500: '#040f3a',
    950: '#000000',
  },
}
SCSS
$custom: #040f3a;
$custom-light: #4f4d71;
$custom-dark: #000000;
JSON
{
  "hex": "#040f3a",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 58
  },
  "hsl": {
    "h": 227.778,
    "s": 87.097,
    "l": 12.157
  },
  "oklch": {
    "l": 0.19439,
    "c": 0.08471,
    "h": 265.8
  },
  "luminance": 0.00673
}

Semantic roles & 50–950 ramp

primary
#040F3A
secondary
#7C691E
accent
#D22BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040F3A

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

Preview Lab → · Contrast checker → · Palette generator →

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