#4042C2#4042C2

#4042C2 is a mid, vivid blue. Relative luminance 0.089; OKLCH L 46.3% C 0.194 H 275.0°. Best body text is #FFFFFF at 7.56:1 contrast (WCAG AA passes).

Color values

HEX#4042C2
RGBrgb(64, 66, 194)
HSLhsl(239, 52%, 51%)
HSVhsv(239, 67%, 76%)
CMYKcmyk(67%, 66%, 0%, 23.9%)
CIE-LABlab(35.75, 39.70, -67.12)
CIE-LCHlch(35.75, 77.98, 300.61°)
OKLaboklab(46.25% 0.017 -0.1937)
OKLCHoklch(46.25% 0.194 275)
XYZxyz(13.7970, 8.8802, 52.0154)
Luminance0.0888 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042C2 #C2C040
analogous
#4083C2 #4042C2 #7F40C2
triadic
#4042C2 #C24042 #42C240
tetradic
#4042C2 #C24083 #C2C040 #40C27F
square
#4042C2 #C24083 #C2C040 #40C27F
split-complementary
#4042C2 #C27F40 #83C240
monochromatic
#212267 #303195 #4042C2 #6E70D1 #9D9EE0

Accessibility & contrast

On white

7.56
#4042C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.78
#4042C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042C2
7.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042C2#FFFFFF#000000##FFFFFF
##4042C21.007.562.787.56
#FFFFFF7.561.0021.001.00
#0000002.7821.001.0021.00
##FFFFFF7.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC6
Deuteranopia (green-blind)
#004EC0
Tritanopia (blue-blind)
#00647C
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #4042c2;
/* rgb */ color: rgb(64, 66, 194);
/* oklch */ color: oklch(46.3% 0.194 275.0);
Tailwind
colors: {
  custom: {
    50: '#8577d6',
    500: '#4042c2',
    950: '#000000',
  },
}
SCSS
$custom: #4042c2;
$custom-light: #8577d6;
$custom-dark: #000000;
JSON
{
  "hex": "#4042c2",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 194
  },
  "hsl": {
    "h": 239.077,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.46252,
    "c": 0.19449,
    "h": 275
  },
  "luminance": 0.08881
}

Semantic roles & 50–950 ramp

primary
#4042C2
secondary
#CCCB92
accent
#D94DDB
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4042C2

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

Preview Lab → · Contrast checker → · Palette generator →

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