#042040#042040

#042040 is a very dark, moderate cyan. Relative luminance 0.014; OKLCH L 24.4% C 0.070 H 254.2°. Best body text is #FFFFFF at 16.33:1 contrast (WCAG AA passes).

Color values

HEX#042040
RGBrgb(4, 32, 64)
HSLhsl(212, 88%, 13%)
HSVhsv(212, 94%, 25%)
CMYKcmyk(93.8%, 50%, 0%, 74.9%)
CIE-LABlab(12.15, 3.85, -23.31)
CIE-LCHlch(12.15, 23.63, 279.39°)
OKLaboklab(24.36% -0.019 -0.0669)
OKLCHoklch(24.36% 0.07 254.2)
XYZxyz(1.4916, 1.4288, 5.0467)
Luminance0.0143 (WCAG relative)
Temperaturecool
Familycyan

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#042040 #402404
analogous
#043E40 #042040 #060440
triadic
#042040 #400420 #204004
tetradic
#042040 #40043E #402404 #044006
square
#042040 #40043E #402404 #044006
split-complementary
#042040 #400604 #3E4004
monochromatic
#020E1D #020E1D #042040 #083D7A #0B5AB3

Accessibility & contrast

On white

16.33
#042040 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.29
#042040 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #042040
16.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##042040#FFFFFF#000000##FFFFFF
##0420401.0016.331.2916.33
#FFFFFF16.331.0021.001.00
#0000001.2921.001.0021.00
##FFFFFF16.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0F2341
Deuteranopia (green-blind)
#041D3F
Tritanopia (blue-blind)
#00282C
Achromatopsia (no color)
#202020

Design tokens & code

CSS
--color: #042040;
/* rgb */ color: rgb(4, 32, 64);
/* oklch */ color: oklch(24.4% 0.070 254.2);
Tailwind
colors: {
  custom: {
    50: '#505a75',
    500: '#042040',
    950: '#000000',
  },
}
SCSS
$custom: #042040;
$custom-light: #505a75;
$custom-dark: #000000;
JSON
{
  "hex": "#042040",
  "rgb": {
    "r": 4,
    "g": 32,
    "b": 64
  },
  "hsl": {
    "h": 212,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.24357,
    "c": 0.06952,
    "h": 254.2
  },
  "luminance": 0.01429
}

Semantic roles & 50–950 ramp

primary
#042040
secondary
#81531F
accent
#9B29FE
background
#F4F5F7
surface
#E7E9ED
border
#C3C5C8
text
#020308
muted
#78787B

Preview Lab

Preview with #042040

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

Preview Lab → · Contrast checker → · Palette generator →

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