#040D3B#040D3B

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

Color values

HEX#040D3B
RGBrgb(4, 13, 59)
HSLhsl(230, 87%, 12%)
HSVhsv(230, 93%, 23%)
CMYKcmyk(93.2%, 78%, 0%, 76.9%)
CIE-LABlab(5.68, 15.47, -30.22)
CIE-LCHlch(5.68, 33.95, 297.11°)
OKLaboklab(19.12% -0.0052 -0.0889)
OKLCHoklch(19.12% 0.089 266.7)
XYZxyz(0.9831, 0.6293, 4.2065)
Luminance0.0063 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040D3B #3B3204
analogous
#04293B #040D3B #17043B
triadic
#040D3B #3B040D #0D3B04
tetradic
#040D3B #3B0429 #3B3204 #043B17
square
#040D3B #3B0429 #3B3204 #043B17
split-complementary
#040D3B #3B1704 #293B04
monochromatic
#02061D #02061D #040D3B #081A74 #0C26AE

Accessibility & contrast

On white

18.65
#040D3B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040D3B
18.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040D3B#FFFFFF#000000##FFFFFF
##040D3B1.0018.651.1318.65
#FFFFFF18.651.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00153C
Deuteranopia (green-blind)
#00103A
Tritanopia (blue-blind)
#001A22
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040d3b;
/* rgb */ color: rgb(4, 13, 59);
/* oklch */ color: oklch(19.1% 0.089 266.7);
Tailwind
colors: {
  custom: {
    50: '#4f4c71',
    500: '#040d3b',
    950: '#000000',
  },
}
SCSS
$custom: #040d3b;
$custom-light: #4f4c71;
$custom-dark: #000000;
JSON
{
  "hex": "#040d3b",
  "rgb": {
    "r": 4,
    "g": 13,
    "b": 59
  },
  "hsl": {
    "h": 230.182,
    "s": 87.302,
    "l": 12.353
  },
  "oklch": {
    "l": 0.19119,
    "c": 0.08907,
    "h": 266.7
  },
  "luminance": 0.00629
}

Semantic roles & 50–950 ramp

primary
#040D3B
secondary
#7D6D1E
accent
#DB2AFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020108
muted
#78777B

Preview Lab

Preview with #040D3B

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

Preview Lab → · Contrast checker → · Palette generator →

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