#4042BA#4042BA

#4042BA is a mid, vivid blue. Relative luminance 0.085; OKLCH L 45.5% C 0.184 H 275.5°. Best body text is #FFFFFF at 7.76:1 contrast (WCAG AA passes).

Color values

HEX#4042BA
RGBrgb(64, 66, 186)
HSLhsl(239, 49%, 49%)
HSVhsv(239, 66%, 73%)
CMYKcmyk(65.6%, 64.5%, 0%, 27.1%)
CIE-LABlab(35.06, 37.00, -63.55)
CIE-LCHlch(35.06, 73.53, 300.21°)
OKLaboklab(45.54% 0.0177 -0.1833)
OKLCHoklch(45.54% 0.184 275.5)
XYZxyz(12.9226, 8.5305, 47.4104)
Luminance0.0853 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042BA #BAB840
analogous
#407FBA #4042BA #7B40BA
triadic
#4042BA #BA4042 #42BA40
tetradic
#4042BA #BA407F #BAB840 #40BA7B
square
#4042BA #BA407F #BAB840 #40BA7B
split-complementary
#4042BA #BA7B40 #7FBA40
monochromatic
#21225F #30328C #4042BA #6B6DCC #999ADC

Accessibility & contrast

On white

7.76
#4042BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.71
#4042BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042BA
7.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042BA#FFFFFF#000000##FFFFFF
##4042BA1.007.762.717.76
#FFFFFF7.761.0021.001.00
#0000002.7121.001.0021.00
##FFFFFF7.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0058BE
Deuteranopia (green-blind)
#004DB8
Tritanopia (blue-blind)
#006178
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #4042ba;
/* rgb */ color: rgb(64, 66, 186);
/* oklch */ color: oklch(45.5% 0.184 275.5);
Tailwind
colors: {
  custom: {
    50: '#8377d0',
    500: '#4042ba',
    950: '#000000',
  },
}
SCSS
$custom: #4042ba;
$custom-light: #8377d0;
$custom-dark: #000000;
JSON
{
  "hex": "#4042ba",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 186
  },
  "hsl": {
    "h": 239.016,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.45538,
    "c": 0.18413,
    "h": 275.5
  },
  "luminance": 0.08532
}

Semantic roles & 50–950 ramp

primary
#4042BA
secondary
#C8C78E
accent
#D64FD8
background
#F8F7FC
surface
#F0EDF9
border
#CBC8D2
text
#0C0814
muted
#7D7B82

Preview Lab

Preview with #4042BA

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

Preview Lab → · Contrast checker → · Palette generator →

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