#4042C5#4042C5

#4042C5 is a mid, vivid blue. Relative luminance 0.090; OKLCH L 46.5% C 0.198 H 274.8°. Best body text is #FFFFFF at 7.49:1 contrast (WCAG AA passes).

Color values

HEX#4042C5
RGBrgb(64, 66, 197)
HSLhsl(239, 53%, 51%)
HSVhsv(239, 68%, 77%)
CMYKcmyk(67.5%, 66.5%, 0%, 22.7%)
CIE-LABlab(36.02, 40.71, -68.44)
CIE-LCHlch(36.02, 79.63, 300.75°)
OKLaboklab(46.52% 0.0167 -0.1976)
OKLCHoklch(46.52% 0.198 274.8)
XYZxyz(14.1373, 9.0164, 53.8078)
Luminance0.0902 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042C5 #C5C340
analogous
#4084C5 #4042C5 #8040C5
triadic
#4042C5 #C54042 #42C540
tetradic
#4042C5 #C54084 #C5C340 #40C580
square
#4042C5 #C54084 #C5C340 #40C580
split-complementary
#4042C5 #C58040 #84C540
monochromatic
#20216A #2F3099 #4042C5 #6F70D3 #9E9FE2

Accessibility & contrast

On white

7.49
#4042C5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.80
#4042C5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042C5
7.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042C5#FFFFFF#000000##FFFFFF
##4042C51.007.492.807.49
#FFFFFF7.491.0021.001.00
#0000002.8021.001.0021.00
##FFFFFF7.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC9
Deuteranopia (green-blind)
#004FC3
Tritanopia (blue-blind)
#00657E
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #4042c5;
/* rgb */ color: rgb(64, 66, 197);
/* oklch */ color: oklch(46.5% 0.198 274.8);
Tailwind
colors: {
  custom: {
    50: '#8677d8',
    500: '#4042c5',
    950: '#000000',
  },
}
SCSS
$custom: #4042c5;
$custom-light: #8677d8;
$custom-dark: #000000;
JSON
{
  "hex": "#4042c5",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 197
  },
  "hsl": {
    "h": 239.098,
    "s": 53.414,
    "l": 51.176
  },
  "oklch": {
    "l": 0.46524,
    "c": 0.19832,
    "h": 274.8
  },
  "luminance": 0.09018
}

Semantic roles & 50–950 ramp

primary
#4042C5
secondary
#CECD93
accent
#DB4BDD
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0D0815
muted
#7D7B83

Preview Lab

Preview with #4042C5

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

Preview Lab → · Contrast checker → · Palette generator →

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