#040D31#040D31

#040D31 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.9% C 0.073 H 266.2°. Best body text is #FFFFFF at 18.97:1 contrast (WCAG AA passes).

Color values

HEX#040D31
RGBrgb(4, 13, 49)
HSLhsl(228, 85%, 10%)
HSVhsv(228, 92%, 19%)
CMYKcmyk(91.8%, 73.5%, 0%, 80.8%)
CIE-LABlab(4.84, 9.81, -24.27)
CIE-LCHlch(4.84, 26.18, 292.00°)
OKLaboklab(17.95% -0.0048 -0.0729)
OKLCHoklch(17.95% 0.073 266.2)
XYZxyz(0.7482, 0.5353, 2.9690)
Luminance0.0053 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040D31 #312804
analogous
#042331 #040D31 #110431
triadic
#040D31 #31040D #0D3104
tetradic
#040D31 #310423 #312804 #043111
square
#040D31 #310423 #312804 #043111
split-complementary
#040D31 #311104 #233104
monochromatic
#02081C #02081C #040D31 #091C6A #0D2BA2

Accessibility & contrast

On white

18.97
#040D31 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.11
#040D31 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040D31
18.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040D31#FFFFFF#000000##FFFFFF
##040D311.0018.971.1118.97
#FFFFFF18.971.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001332
Deuteranopia (green-blind)
#000E30
Tritanopia (blue-blind)
#00161D
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040d31;
/* rgb */ color: rgb(4, 13, 49);
/* oklch */ color: oklch(17.9% 0.073 266.2);
Tailwind
colors: {
  custom: {
    50: '#4b4c69',
    500: '#040d31',
    950: '#000000',
  },
}
SCSS
$custom: #040d31;
$custom-light: #4b4c69;
$custom-dark: #000000;
JSON
{
  "hex": "#040d31",
  "rgb": {
    "r": 4,
    "g": 13,
    "b": 49
  },
  "hsl": {
    "h": 228,
    "s": 84.906,
    "l": 10.392
  },
  "oklch": {
    "l": 0.17948,
    "c": 0.07308,
    "h": 266.2
  },
  "luminance": 0.00535
}

Semantic roles & 50–950 ramp

primary
#040D31
secondary
#73621D
accent
#D22DFB
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040D31

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

Preview Lab → · Contrast checker → · Palette generator →

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