#040541#040541

#040541 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 18.4% C 0.108 H 268.3°. Best body text is #FFFFFF at 19.04:1 contrast (WCAG AA passes).

Color values

HEX#040541
RGBrgb(4, 5, 65)
HSLhsl(239, 88%, 14%)
HSVhsv(239, 94%, 25%)
CMYKcmyk(93.8%, 92.3%, 0%, 74.5%)
CIE-LABlab(4.66, 22.59, -36.21)
CIE-LCHlch(4.66, 42.68, 301.96°)
OKLaboklab(18.38% -0.0032 -0.1079)
OKLCHoklch(18.38% 0.108 268.3)
XYZxyz(1.0581, 0.5159, 5.0438)
Luminance0.0052 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040541 #414004
analogous
#042341 #040541 #210441
triadic
#040541 #410405 #054104
tetradic
#040541 #410423 #414004 #044121
square
#040541 #410423 #414004 #044121
split-complementary
#040541 #412104 #234104
monochromatic
#02021D #02021D #040541 #08097B #0B0EB4

Accessibility & contrast

On white

19.04
#040541 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040541
19.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040541#FFFFFF#000000##FFFFFF
##0405411.0019.041.1019.04
#FFFFFF19.041.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001343
Deuteranopia (green-blind)
#000D40
Tritanopia (blue-blind)
#001823
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040541;
/* rgb */ color: rgb(4, 5, 65);
/* oklch */ color: oklch(18.4% 0.108 268.3);
Tailwind
colors: {
  custom: {
    50: '#524776',
    500: '#040541',
    950: '#000000',
  },
}
SCSS
$custom: #040541;
$custom-light: #524776;
$custom-dark: #000000;
JSON
{
  "hex": "#040541",
  "rgb": {
    "r": 4,
    "g": 5,
    "b": 65
  },
  "hsl": {
    "h": 239.016,
    "s": 88.406,
    "l": 13.529
  },
  "oklch": {
    "l": 0.18376,
    "c": 0.10798,
    "h": 268.3
  },
  "luminance": 0.00516
}

Semantic roles & 50–950 ramp

primary
#040541
secondary
#82811F
accent
#FB29FF
background
#F5F4F7
surface
#E8E6ED
border
#C4C2C8
text
#030008
muted
#78777B

Preview Lab

Preview with #040541

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

Preview Lab → · Contrast checker → · Palette generator →

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