#4042CC#4042CC

#4042CC is a mid, highly saturated blue. Relative luminance 0.093; OKLCH L 47.2% C 0.207 H 274.4°. Best body text is #FFFFFF at 7.32:1 contrast (WCAG AA passes).

Color values

HEX#4042CC
RGBrgb(64, 66, 204)
HSLhsl(239, 58%, 53%)
HSVhsv(239, 69%, 80%)
CMYKcmyk(68.6%, 67.6%, 0%, 20%)
CIE-LABlab(36.64, 43.05, -71.49)
CIE-LCHlch(36.64, 83.45, 301.06°)
OKLaboklab(47.17% 0.016 -0.2065)
OKLCHoklch(47.17% 0.207 274.4)
XYZxyz(14.9580, 9.3447, 58.1304)
Luminance0.0935 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042CC #CCCA40
analogous
#4088CC #4042CC #8440CC
triadic
#4042CC #CC4042 #42CC40
tetradic
#4042CC #CC4088 #CCCA40 #40CC84
square
#4042CC #CC4088 #CCCA40 #40CC84
split-complementary
#4042CC #CC8440 #88CC40
monochromatic
#1F2073 #2C2DA3 #4042CC #7072D9 #A1A2E6

Accessibility & contrast

On white

7.32
#4042CC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.87
#4042CC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042CC
7.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042CC#FFFFFF#000000##FFFFFF
##4042CC1.007.322.877.32
#FFFFFF7.321.0021.001.00
#0000002.8721.001.0021.00
##FFFFFF7.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DD0
Deuteranopia (green-blind)
#0050C9
Tritanopia (blue-blind)
#006782
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #4042cc;
/* rgb */ color: rgb(64, 66, 204);
/* oklch */ color: oklch(47.2% 0.207 274.4);
Tailwind
colors: {
  custom: {
    50: '#8777dd',
    500: '#4042cc',
    950: '#000000',
  },
}
SCSS
$custom: #4042cc;
$custom-light: #8777dd;
$custom-dark: #000000;
JSON
{
  "hex": "#4042cc",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 204
  },
  "hsl": {
    "h": 239.143,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.47167,
    "c": 0.20714,
    "h": 274.4
  },
  "luminance": 0.09346
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #4042CC

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

Preview Lab → · Contrast checker → · Palette generator →

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