#4042CB#4042CB

#4042CB is a mid, highly saturated blue. Relative luminance 0.093; OKLCH L 47.1% C 0.206 H 274.5°. Best body text is #FFFFFF at 7.34:1 contrast (WCAG AA passes).

Color values

HEX#4042CB
RGBrgb(64, 66, 203)
HSLhsl(239, 57%, 52%)
HSVhsv(239, 68%, 80%)
CMYKcmyk(68.5%, 67.5%, 0%, 20.4%)
CIE-LABlab(36.55, 42.72, -71.06)
CIE-LCHlch(36.55, 82.91, 301.02°)
OKLaboklab(47.07% 0.0161 -0.2053)
OKLCHoklch(47.07% 0.206 274.5)
XYZxyz(14.8385, 9.2968, 57.5008)
Luminance0.0930 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042CB #CBC940
analogous
#4087CB #4042CB #8440CB
triadic
#4042CB #CB4042 #42CB40
tetradic
#4042CB #CB4087 #CBC940 #40CB84
square
#4042CB #CB4087 #CBC940 #40CB84
split-complementary
#4042CB #CB8440 #87CB40
monochromatic
#1F2072 #2C2EA2 #4042CB #7072D8 #A0A1E5

Accessibility & contrast

On white

7.34
#4042CB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.86
#4042CB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042CB
7.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042CB#FFFFFF#000000##FFFFFF
##4042CB1.007.342.867.34
#FFFFFF7.341.0021.001.00
#0000002.8621.001.0021.00
##FFFFFF7.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CCF
Deuteranopia (green-blind)
#0050C8
Tritanopia (blue-blind)
#006781
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #4042cb;
/* rgb */ color: rgb(64, 66, 203);
/* oklch */ color: oklch(47.1% 0.206 274.5);
Tailwind
colors: {
  custom: {
    50: '#8777dc',
    500: '#4042cb',
    950: '#000000',
  },
}
SCSS
$custom: #4042cb;
$custom-light: #8777dc;
$custom-dark: #000000;
JSON
{
  "hex": "#4042cb",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 203
  },
  "hsl": {
    "h": 239.137,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.47074,
    "c": 0.2059,
    "h": 274.5
  },
  "luminance": 0.09298
}

Semantic roles & 50–950 ramp

primary
#4042CB
secondary
#D2D195
accent
#DE47E0
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0915
muted
#7E7B83

Preview Lab

Preview with #4042CB

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

Preview Lab → · Contrast checker → · Palette generator →

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