#4042BF#4042BF

#4042BF is a mid, vivid blue. Relative luminance 0.087; OKLCH L 46.0% C 0.191 H 275.2°. Best body text is #FFFFFF at 7.64:1 contrast (WCAG AA passes).

Color values

HEX#4042BF
RGBrgb(64, 66, 191)
HSLhsl(239, 50%, 50%)
HSVhsv(239, 66%, 75%)
CMYKcmyk(66.5%, 65.4%, 0%, 25.1%)
CIE-LABlab(35.49, 38.69, -65.79)
CIE-LCHlch(35.49, 76.32, 300.46°)
OKLaboklab(45.98% 0.0173 -0.1898)
OKLCHoklch(45.98% 0.191 275.2)
XYZxyz(13.4634, 8.7468, 50.2589)
Luminance0.0875 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042BF #BFBD40
analogous
#4082BF #4042BF #7D40BF
triadic
#4042BF #BF4042 #42BF40
tetradic
#4042BF #BF4082 #BFBD40 #40BF7D
square
#4042BF #BF4082 #BFBD40 #40BF7D
split-complementary
#4042BF #BF7D40 #82BF40
monochromatic
#212263 #313291 #4042BF #6E6FCE #9C9DDE

Accessibility & contrast

On white

7.64
#4042BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.75
#4042BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042BF
7.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042BF#FFFFFF#000000##FFFFFF
##4042BF1.007.642.757.64
#FFFFFF7.641.0021.001.00
#0000002.7521.001.0021.00
##FFFFFF7.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0059C3
Deuteranopia (green-blind)
#004EBD
Tritanopia (blue-blind)
#00637A
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #4042bf;
/* rgb */ color: rgb(64, 66, 191);
/* oklch */ color: oklch(46.0% 0.191 275.2);
Tailwind
colors: {
  custom: {
    50: '#8477d3',
    500: '#4042bf',
    950: '#000000',
  },
}
SCSS
$custom: #4042bf;
$custom-light: #8477d3;
$custom-dark: #000000;
JSON
{
  "hex": "#4042bf",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 191
  },
  "hsl": {
    "h": 239.055,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.45983,
    "c": 0.19063,
    "h": 275.2
  },
  "luminance": 0.08748
}

Semantic roles & 50–950 ramp

primary
#4042BF
secondary
#CAC991
accent
#D74ED9
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4042BF

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

Preview Lab → · Contrast checker → · Palette generator →

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