#042AFF#042AFF

#042AFF is a mid, highly saturated blue. Relative luminance 0.089; OKLCH L 47.6% C 0.297 H 264.4°. Best body text is #FFFFFF at 7.55:1 contrast (WCAG AA passes).

Color values

HEX#042AFF
RGBrgb(4, 42, 255)
HSLhsl(231, 100%, 51%)
HSVhsv(231, 98%, 100%)
CMYKcmyk(98.4%, 83.5%, 0%, 0%)
CIE-LABlab(35.79, 68.72, -102.03)
CIE-LCHlch(35.79, 123.01, 303.96°)
OKLaboklab(47.6% -0.0288 -0.2956)
OKLCHoklch(47.6% 0.297 264.4)
XYZxyz(18.9217, 8.8991, 95.3087)
Luminance0.0890 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#042AFF #FFD904
analogous
#04A8FF #042AFF #5B04FF
triadic
#042AFF #FF042A #2AFF04
tetradic
#042AFF #FF04A8 #FFD904 #04FF5B
square
#042AFF #FF04A8 #FFD904 #04FF5B
split-complementary
#042AFF #FF5B04 #A8FF04
monochromatic
#001589 #001EC6 #042AFF #415EFF #7E92FF

Accessibility & contrast

On white

7.55
#042AFF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.78
#042AFF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #042AFF
7.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##042AFF#FFFFFF#000000##FFFFFF
##042AFF1.007.552.787.55
#FFFFFF7.551.0021.001.00
#0000002.7821.001.0021.00
##FFFFFF7.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060FF
Deuteranopia (green-blind)
#0047FC
Tritanopia (blue-blind)
#007299
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #042aff;
/* rgb */ color: rgb(4, 42, 255);
/* oklch */ color: oklch(47.6% 0.297 264.4);
Tailwind
colors: {
  custom: {
    50: '#896aff',
    500: '#042aff',
    950: '#000000',
  },
}
SCSS
$custom: #042aff;
$custom-light: #896aff;
$custom-dark: #000000;
JSON
{
  "hex": "#042aff",
  "rgb": {
    "r": 4,
    "g": 42,
    "b": 255
  },
  "hsl": {
    "h": 230.916,
    "s": 100,
    "l": 50.784
  },
  "oklch": {
    "l": 0.47596,
    "c": 0.29696,
    "h": 264.4
  },
  "luminance": 0.08902
}

Semantic roles & 50–950 ramp

primary
#042AFF
secondary
#E7D678
accent
#DF29FF
background
#F9F6FF
surface
#F2EBFF
border
#CCC6D7
text
#0F0718
muted
#7E7A86

Preview Lab

Preview with #042AFF

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

Preview Lab → · Contrast checker → · Palette generator →

#042AFF Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva