#040939#040939

#040939 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 18.1% C 0.091 H 268.1°. Best body text is #FFFFFF at 19.03:1 contrast (WCAG AA passes).

Color values

HEX#040939
RGBrgb(4, 9, 57)
HSLhsl(234, 87%, 12%)
HSVhsv(234, 93%, 22%)
CMYKcmyk(93%, 84.2%, 0%, 77.6%)
CIE-LABlab(4.67, 16.15, -30.43)
CIE-LCHlch(4.67, 34.45, 297.96°)
OKLaboklab(18.06% -0.0031 -0.0912)
OKLCHoklch(18.06% 0.091 268.1)
XYZxyz(0.8860, 0.5165, 3.9231)
Luminance0.0052 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040939 #393404
analogous
#042439 #040939 #1A0439
triadic
#040939 #390409 #093904
tetradic
#040939 #390424 #393404 #04391A
square
#040939 #390424 #393404 #04391A
split-complementary
#040939 #391A04 #243904
monochromatic
#02051D #02051D #040939 #081272 #0C1BAB

Accessibility & contrast

On white

19.03
#040939 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.10
#040939 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040939
19.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040939#FFFFFF#000000##FFFFFF
##0409391.0019.031.1019.03
#FFFFFF19.031.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.031.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #040939;
/* rgb */ color: rgb(4, 9, 57);
/* oklch */ color: oklch(18.1% 0.091 268.1);
Tailwind
colors: {
  custom: {
    50: '#4e4a70',
    500: '#040939',
    950: '#000000',
  },
}
SCSS
$custom: #040939;
$custom-light: #4e4a70;
$custom-dark: #000000;
JSON
{
  "hex": "#040939",
  "rgb": {
    "r": 4,
    "g": 9,
    "b": 57
  },
  "hsl": {
    "h": 234.34,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.18058,
    "c": 0.0913,
    "h": 268.1
  },
  "luminance": 0.00517
}

Semantic roles & 50–950 ramp

primary
#040939
secondary
#7B721E
accent
#E92BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040939

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

Preview Lab → · Contrast checker → · Palette generator →

#040939 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva