#4042C1#4042C1

#4042C1 is a mid, vivid blue. Relative luminance 0.088; OKLCH L 46.2% C 0.193 H 275.1°. Best body text is #FFFFFF at 7.59:1 contrast (WCAG AA passes).

Color values

HEX#4042C1
RGBrgb(64, 66, 193)
HSLhsl(239, 51%, 50%)
HSVhsv(239, 67%, 76%)
CMYKcmyk(66.8%, 65.8%, 0%, 24.3%)
CIE-LABlab(35.67, 39.37, -66.67)
CIE-LCHlch(35.67, 77.43, 300.56°)
OKLaboklab(46.16% 0.0171 -0.1924)
OKLCHoklch(46.16% 0.193 275.1)
XYZxyz(13.6850, 8.8355, 51.4260)
Luminance0.0884 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4042C1 #C1BF40
analogous
#4082C1 #4042C1 #7F40C1
triadic
#4042C1 #C14042 #42C140
tetradic
#4042C1 #C14082 #C1BF40 #40C17F
square
#4042C1 #C14082 #C1BF40 #40C17F
split-complementary
#4042C1 #C17F40 #82C140
monochromatic
#212266 #303294 #4042C1 #6E70D0 #9C9DDF

Accessibility & contrast

On white

7.59
#4042C1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.77
#4042C1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4042C1
7.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4042C1#FFFFFF#000000##FFFFFF
##4042C11.007.592.777.59
#FFFFFF7.591.0021.001.00
#0000002.7721.001.0021.00
##FFFFFF7.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AC5
Deuteranopia (green-blind)
#004EBF
Tritanopia (blue-blind)
#00637C
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #4042c1;
/* rgb */ color: rgb(64, 66, 193);
/* oklch */ color: oklch(46.2% 0.193 275.1);
Tailwind
colors: {
  custom: {
    50: '#8577d5',
    500: '#4042c1',
    950: '#000000',
  },
}
SCSS
$custom: #4042c1;
$custom-light: #8577d5;
$custom-dark: #000000;
JSON
{
  "hex": "#4042c1",
  "rgb": {
    "r": 64,
    "g": 66,
    "b": 193
  },
  "hsl": {
    "h": 239.07,
    "s": 50.988,
    "l": 50.392
  },
  "oklch": {
    "l": 0.46162,
    "c": 0.1932,
    "h": 275.1
  },
  "luminance": 0.08837
}

Semantic roles & 50–950 ramp

primary
#4042C1
secondary
#CBCA92
accent
#D84DDA
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4042C1

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

Preview Lab → · Contrast checker → · Palette generator →

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