#041240#041240

#041240 is a very dark, moderate blue. Relative luminance 0.008; OKLCH L 20.8% C 0.090 H 264.8°. Best body text is #FFFFFF at 18.01:1 contrast (WCAG AA passes).

Color values

HEX#041240
RGBrgb(4, 18, 64)
HSLhsl(226, 88%, 13%)
HSVhsv(226, 94%, 25%)
CMYKcmyk(93.8%, 71.9%, 0%, 74.9%)
CIE-LABlab(7.48, 14.93, -30.88)
CIE-LCHlch(7.48, 34.30, 295.81°)
OKLaboklab(20.8% -0.0081 -0.0895)
OKLCHoklch(20.8% 0.09 264.8)
XYZxyz(1.1915, 0.8284, 4.9466)
Luminance0.0083 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#041240 #403204
analogous
#043040 #041240 #140440
triadic
#041240 #400412 #124004
tetradic
#041240 #400430 #403204 #044014
square
#041240 #400430 #403204 #044014
split-complementary
#041240 #401404 #304004
monochromatic
#02081D #02081D #041240 #08227A #0B32B3

Accessibility & contrast

On white

18.01
#041240 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.17
#041240 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #041240
18.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##041240#FFFFFF#000000##FFFFFF
##0412401.0018.011.1718.01
#FFFFFF18.011.0021.001.00
#0000001.1721.001.0021.00
##FFFFFF18.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001941
Deuteranopia (green-blind)
#00143F
Tritanopia (blue-blind)
#001E26
Achromatopsia (no color)
#161616

Design tokens & code

CSS
--color: #041240;
/* rgb */ color: rgb(4, 18, 64);
/* oklch */ color: oklch(20.8% 0.090 264.8);
Tailwind
colors: {
  custom: {
    50: '#514f75',
    500: '#041240',
    950: '#000000',
  },
}
SCSS
$custom: #041240;
$custom-light: #514f75;
$custom-dark: #000000;
JSON
{
  "hex": "#041240",
  "rgb": {
    "r": 4,
    "g": 18,
    "b": 64
  },
  "hsl": {
    "h": 226,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.20802,
    "c": 0.08986,
    "h": 264.8
  },
  "luminance": 0.00829
}

Semantic roles & 50–950 ramp

primary
#041240
secondary
#816A1F
accent
#CD29FE
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#020108
muted
#78777B

Preview Lab

Preview with #041240

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

Preview Lab → · Contrast checker → · Palette generator →

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