#040F31#040F31

#040F31 is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 18.4% C 0.070 H 264.8°. Best body text is #FFFFFF at 18.79:1 contrast (WCAG AA passes).

Color values

HEX#040F31
RGBrgb(4, 15, 49)
HSLhsl(225, 85%, 10%)
HSVhsv(225, 92%, 19%)
CMYKcmyk(91.8%, 69.4%, 0%, 80.8%)
CIE-LABlab(5.32, 8.81, -23.50)
CIE-LCHlch(5.32, 25.10, 290.56°)
OKLaboklab(18.44% -0.0064 -0.0697)
OKLCHoklch(18.44% 0.07 264.8)
XYZxyz(0.7751, 0.5891, 2.9780)
Luminance0.0059 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F31 #312604
analogous
#042531 #040F31 #0F0431
triadic
#040F31 #31040F #0F3104
tetradic
#040F31 #310425 #312604 #04310F
square
#040F31 #310425 #312604 #04310F
split-complementary
#040F31 #310F04 #253104
monochromatic
#02091C #02091C #040F31 #09206A #0D32A2

Accessibility & contrast

On white

18.79
#040F31 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F31
18.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F31#FFFFFF#000000##FFFFFF
##040F311.0018.791.1218.79
#FFFFFF18.791.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001432
Deuteranopia (green-blind)
#001030
Tritanopia (blue-blind)
#00181E
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040f31;
/* rgb */ color: rgb(4, 15, 49);
/* oklch */ color: oklch(18.4% 0.070 264.8);
Tailwind
colors: {
  custom: {
    50: '#4b4d69',
    500: '#040f31',
    950: '#000000',
  },
}
SCSS
$custom: #040f31;
$custom-light: #4b4d69;
$custom-dark: #000000;
JSON
{
  "hex": "#040f31",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 49
  },
  "hsl": {
    "h": 225.333,
    "s": 84.906,
    "l": 10.392
  },
  "oklch": {
    "l": 0.1844,
    "c": 0.07002,
    "h": 264.8
  },
  "luminance": 0.00589
}

Semantic roles & 50–950 ramp

primary
#040F31
secondary
#735E1D
accent
#C92DFB
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040F31

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

Preview Lab → · Contrast checker → · Palette generator →

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