#040D3A#040D3A

#040D3A is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 19.0% C 0.088 H 266.7°. Best body text is #FFFFFF at 18.69:1 contrast (WCAG AA passes).

Color values

HEX#040D3A
RGBrgb(4, 13, 58)
HSLhsl(230, 87%, 12%)
HSVhsv(230, 93%, 23%)
CMYKcmyk(93.1%, 77.6%, 0%, 77.3%)
CIE-LABlab(5.59, 14.92, -29.65)
CIE-LCHlch(5.59, 33.19, 296.71°)
OKLaboklab(19% -0.0051 -0.0874)
OKLCHoklch(19% 0.088 266.7)
XYZxyz(0.9574, 0.6190, 4.0712)
Luminance0.0062 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040D3A #3A3104
analogous
#04283A #040D3A #16043A
triadic
#040D3A #3A040D #0D3A04
tetradic
#040D3A #3A0428 #3A3104 #043A16
square
#040D3A #3A0428 #3A3104 #043A16
split-complementary
#040D3A #3A1604 #283A04
monochromatic
#02061D #02061D #040D3A #081A73 #0C27AD

Accessibility & contrast

On white

18.69
#040D3A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040D3A
18.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040D3A#FFFFFF#000000##FFFFFF
##040D3A1.0018.691.1218.69
#FFFFFF18.691.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00153B
Deuteranopia (green-blind)
#001039
Tritanopia (blue-blind)
#001922
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040d3a;
/* rgb */ color: rgb(4, 13, 58);
/* oklch */ color: oklch(19.0% 0.088 266.7);
Tailwind
colors: {
  custom: {
    50: '#4f4c71',
    500: '#040d3a',
    950: '#000000',
  },
}
SCSS
$custom: #040d3a;
$custom-light: #4f4c71;
$custom-dark: #000000;
JSON
{
  "hex": "#040d3a",
  "rgb": {
    "r": 4,
    "g": 13,
    "b": 58
  },
  "hsl": {
    "h": 230,
    "s": 87.097,
    "l": 12.157
  },
  "oklch": {
    "l": 0.18998,
    "c": 0.08753,
    "h": 266.7
  },
  "luminance": 0.00619
}

Semantic roles & 50–950 ramp

primary
#040D3A
secondary
#7C6C1E
accent
#DA2BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040D3A

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

Preview Lab → · Contrast checker → · Palette generator →

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