#040A39#040A39

#040A39 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 18.3% C 0.090 H 267.8°. Best body text is #FFFFFF at 18.96:1 contrast (WCAG AA passes).

Color values

HEX#040A39
RGBrgb(4, 10, 57)
HSLhsl(233, 87%, 12%)
HSVhsv(233, 93%, 22%)
CMYKcmyk(93%, 82.5%, 0%, 77.6%)
CIE-LABlab(4.86, 15.74, -30.11)
CIE-LCHlch(4.86, 33.97, 297.60°)
OKLaboklab(18.26% -0.0035 -0.0899)
OKLCHoklch(18.26% 0.09 267.8)
XYZxyz(0.8969, 0.5382, 3.9267)
Luminance0.0054 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040A39 #393304
analogous
#042539 #040A39 #190439
triadic
#040A39 #39040A #0A3904
tetradic
#040A39 #390425 #393304 #043919
square
#040A39 #390425 #393304 #043919
split-complementary
#040A39 #391904 #253904
monochromatic
#02051D #02051D #040A39 #081472 #0C1EAB

Accessibility & contrast

On white

18.96
#040A39 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040A39
18.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040A39#FFFFFF#000000##FFFFFF
##040A391.0018.961.1118.96
#FFFFFF18.961.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00133A
Deuteranopia (green-blind)
#000E38
Tritanopia (blue-blind)
#001720
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040a39;
/* rgb */ color: rgb(4, 10, 57);
/* oklch */ color: oklch(18.3% 0.090 267.8);
Tailwind
colors: {
  custom: {
    50: '#4e4a70',
    500: '#040a39',
    950: '#000000',
  },
}
SCSS
$custom: #040a39;
$custom-light: #4e4a70;
$custom-dark: #000000;
JSON
{
  "hex": "#040a39",
  "rgb": {
    "r": 4,
    "g": 10,
    "b": 57
  },
  "hsl": {
    "h": 233.208,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.18257,
    "c": 0.09,
    "h": 267.8
  },
  "luminance": 0.00538
}

Semantic roles & 50–950 ramp

primary
#040A39
secondary
#7B701E
accent
#E52BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040A39

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

Preview Lab → · Contrast checker → · Palette generator →

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