#051242#051242

#051242 is a very dark, moderate blue. Relative luminance 0.009; OKLCH L 21.1% C 0.093 H 265.8°. Best body text is #FFFFFF at 17.92:1 contrast (WCAG AA passes).

Color values

HEX#051242
RGBrgb(5, 18, 66)
HSLhsl(227, 86%, 14%)
HSVhsv(227, 92%, 26%)
CMYKcmyk(92.4%, 72.7%, 0%, 74.1%)
CIE-LABlab(7.75, 16.02, -31.85)
CIE-LCHlch(7.75, 35.66, 296.70°)
OKLaboklab(21.09% -0.0068 -0.0923)
OKLCHoklch(21.09% 0.093 265.8)
XYZxyz(1.2619, 0.8581, 5.2523)
Luminance0.0086 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#051242 #423505
analogous
#053142 #051242 #170542
triadic
#051242 #420512 #124205
tetradic
#051242 #420531 #423505 #054217
square
#051242 #420531 #423505 #054217
split-complementary
#051242 #421705 #314205
monochromatic
#02081C #02081C #051242 #09227B #0E31B4

Accessibility & contrast

On white

17.92
#051242 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #051242
17.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##051242#FFFFFF#000000##FFFFFF
##0512421.0017.921.1717.92
#FFFFFF17.921.0021.001.00
#0000001.1721.001.0021.00
##FFFFFF17.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001A44
Deuteranopia (green-blind)
#001441
Tritanopia (blue-blind)
#001F27
Achromatopsia (no color)
#171717

Design tokens & code

CSS
--color: #051242;
/* rgb */ color: rgb(5, 18, 66);
/* oklch */ color: oklch(21.1% 0.093 265.8);
Tailwind
colors: {
  custom: {
    50: '#524f77',
    500: '#051242',
    950: '#000000',
  },
}
SCSS
$custom: #051242;
$custom-light: #524f77;
$custom-dark: #000000;
JSON
{
  "hex": "#051242",
  "rgb": {
    "r": 5,
    "g": 18,
    "b": 66
  },
  "hsl": {
    "h": 227.213,
    "s": 85.915,
    "l": 13.922
  },
  "oklch": {
    "l": 0.21089,
    "c": 0.09253,
    "h": 265.8
  },
  "luminance": 0.00858
}

Semantic roles & 50–950 ramp

primary
#051242
secondary
#826D20
accent
#D02CFC
background
#F5F4F7
surface
#E8E7ED
border
#C4C3C8
text
#030209
muted
#78787B

Preview Lab

Preview with #051242

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

Preview Lab → · Contrast checker → · Palette generator →

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