#4042E4#4042E4

#4042E4 is a mid, highly saturated blue. Relative luminance 0.106; OKLCH L 49.4% C 0.236 H 273.1°. Best body text is #FFFFFF at 6.74:1 contrast (WCAG AA passes).

Color values

HEX#4042E4
RGBrgb(64, 66, 228)
HSLhsl(239, 75%, 57%)
HSVhsv(239, 72%, 89%)
CMYKcmyk(71.9%, 71.1%, 0%, 10.6%)
CIE-LABlab(38.87, 50.93, -81.61)
CIE-LCHlch(38.87, 96.20, 301.97°)
OKLaboklab(49.45% 0.0127 -0.2361)
OKLCHoklch(49.45% 0.236 273.1)
XYZxyz(18.0615, 10.5860, 74.4752)
Luminance0.1059 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042E4 #E4E240
analogous
#4094E4 #4042E4 #9040E4
triadic
#4042E4 #E44042 #42E440
tetradic
#4042E4 #E44094 #E4E240 #40E490
square
#4042E4 #E44094 #E4E240 #40E490
split-complementary
#4042E4 #E49040 #94E440
monochromatic
#151795 #1D1FCA #4042E4 #7677EC #ABACF3

Accessibility & contrast

On white

6.74
#4042E4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.12
#4042E4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #4042E4
6.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042E4#FFFFFF#000000##FFFFFF
##4042E41.006.743.126.74
#FFFFFF6.741.0021.001.00
#0000003.1221.001.0021.00
##FFFFFF6.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063E9
Deuteranopia (green-blind)
#0054E1
Tritanopia (blue-blind)
#00708F
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #4042e4;
/* rgb */ color: rgb(64, 66, 228);
/* oklch */ color: oklch(49.4% 0.236 273.1);
Tailwind
colors: {
  custom: {
    50: '#8c78ee',
    500: '#4042e4',
    950: '#000000',
  },
}
SCSS
$custom: #4042e4;
$custom-light: #8c78ee;
$custom-dark: #000000;
JSON
{
  "hex": "#4042e4",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 228
  },
  "hsl": {
    "h": 239.268,
    "s": 75.229,
    "l": 57.255
  },
  "oklch": {
    "l": 0.49449,
    "c": 0.23641,
    "h": 273.1
  },
  "luminance": 0.10588
}

Semantic roles & 50–950 ramp

primary
#4042E4
secondary
#E1E09F
accent
#F036F2
background
#F9F7FE
surface
#F2EDFD
border
#CCC8D5
text
#0E0917
muted
#7E7B85

Preview Lab

Preview with #4042E4

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

Preview Lab → · Contrast checker → · Palette generator →

#4042E4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva