#040539#040539

#040539 is a very dark, moderate blue. Relative luminance 0.004; OKLCH L 17.2% C 0.097 H 269.2°. Best body text is #FFFFFF at 19.34:1 contrast (WCAG AA passes).

Color values

HEX#040539
RGBrgb(4, 5, 57)
HSLhsl(239, 87%, 12%)
HSVhsv(239, 93%, 22%)
CMYKcmyk(93%, 91.2%, 0%, 77.6%)
CIE-LABlab(3.88, 17.79, -31.70)
CIE-LCHlch(3.88, 36.35, 299.30°)
OKLaboklab(17.21% -0.0014 -0.0969)
OKLCHoklch(17.21% 0.097 269.2)
XYZxyz(0.8426, 0.4297, 3.9086)
Luminance0.0043 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040539 #393804
analogous
#042039 #040539 #1E0439
triadic
#040539 #390405 #053904
tetradic
#040539 #390420 #393804 #04391E
square
#040539 #390420 #393804 #04391E
split-complementary
#040539 #391E04 #203904
monochromatic
#02031D #02031D #040539 #080A72 #0C0FAB

Accessibility & contrast

On white

19.34
#040539 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.09
#040539 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040539
19.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040539#FFFFFF#000000##FFFFFF
##0405391.0019.341.0919.34
#FFFFFF19.341.0021.001.00
#0000001.0921.001.0021.00
##FFFFFF19.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00113A
Deuteranopia (green-blind)
#000B38
Tritanopia (blue-blind)
#00151F
Achromatopsia (no color)
#0E0E0E

Design tokens & code

CSS
--color: #040539;
/* rgb */ color: rgb(4, 5, 57);
/* oklch */ color: oklch(17.2% 0.097 269.2);
Tailwind
colors: {
  custom: {
    50: '#4e4870',
    500: '#040539',
    950: '#000000',
  },
}
SCSS
$custom: #040539;
$custom-light: #4e4870;
$custom-dark: #000000;
JSON
{
  "hex": "#040539",
  "rgb": {
    "r": 4,
    "g": 5,
    "b": 57
  },
  "hsl": {
    "h": 238.868,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.17213,
    "c": 0.09693,
    "h": 269.2
  },
  "luminance": 0.0043
}

Semantic roles & 50–950 ramp

primary
#040539
secondary
#7B791E
accent
#F92BFD
background
#F4F4F6
surface
#E7E6EC
border
#C3C2C7
text
#020007
muted
#78777A

Preview Lab

Preview with #040539

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

Preview Lab → · Contrast checker → · Palette generator →

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