#4042B7#4042B7

#4042B7 is a mid, vivid blue. Relative luminance 0.084; OKLCH L 45.3% C 0.180 H 275.7°. Best body text is #FFFFFF at 7.83:1 contrast (WCAG AA passes).

Color values

HEX#4042B7
RGBrgb(64, 66, 183)
HSLhsl(239, 48%, 48%)
HSVhsv(239, 65%, 72%)
CMYKcmyk(65%, 63.9%, 0%, 28.2%)
CIE-LABlab(34.81, 35.98, -62.19)
CIE-LCHlch(34.81, 71.85, 300.05°)
OKLaboklab(45.28% 0.018 -0.1793)
OKLCHoklch(45.28% 0.18 275.7)
XYZxyz(12.6070, 8.4042, 45.7484)
Luminance0.0840 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042B7 #B7B540
analogous
#407DB7 #4042B7 #7940B7
triadic
#4042B7 #B74042 #42B740
tetradic
#4042B7 #B7407D #B7B540 #40B779
square
#4042B7 #B7407D #B7B540 #40B779
split-complementary
#4042B7 #B77940 #7DB740
monochromatic
#20215C #30328A #4042B7 #696BCB #9798DB

Accessibility & contrast

On white

7.83
#4042B7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.68
#4042B7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042B7
7.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042B7#FFFFFF#000000##FFFFFF
##4042B71.007.832.687.83
#FFFFFF7.831.0021.001.00
#0000002.6821.001.0021.00
##FFFFFF7.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057BB
Deuteranopia (green-blind)
#004DB5
Tritanopia (blue-blind)
#006076
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #4042b7;
/* rgb */ color: rgb(64, 66, 183);
/* oklch */ color: oklch(45.3% 0.180 275.7);
Tailwind
colors: {
  custom: {
    50: '#8377ce',
    500: '#4042b7',
    950: '#000000',
  },
}
SCSS
$custom: #4042b7;
$custom-light: #8377ce;
$custom-dark: #000000;
JSON
{
  "hex": "#4042b7",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 183
  },
  "hsl": {
    "h": 238.992,
    "s": 48.178,
    "l": 48.431
  },
  "oklch": {
    "l": 0.45275,
    "c": 0.18019,
    "h": 275.7
  },
  "luminance": 0.08405
}

Semantic roles & 50–950 ramp

primary
#4042B7
secondary
#C6C58D
accent
#D550D8
background
#F8F7FC
surface
#F0EDF9
border
#CBC8D2
text
#0C0814
muted
#7D7B82

Preview Lab

Preview with #4042B7

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

Preview Lab → · Contrast checker → · Palette generator →

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