#5F42E7#5F42E7

#5F42E7 is a mid, highly saturated violet. Relative luminance 0.121; OKLCH L 51.9% C 0.234 H 282.6°. Best body text is #FFFFFF at 6.14:1 contrast (WCAG AA passes).

Color values

HEX#5F42E7
RGBrgb(95, 66, 231)
HSLhsl(251, 77%, 58%)
HSVhsv(251, 71%, 91%)
CMYKcmyk(58.9%, 71.4%, 0%, 9.4%)
CIE-LABlab(41.37, 55.40, -79.12)
CIE-LCHlch(41.37, 96.59, 305.00°)
OKLaboklab(51.88% 0.051 -0.228)
OKLCHoklch(51.88% 0.234 282.6)
XYZxyz(21.0869, 12.0974, 76.8097)
Luminance0.1210 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42E7 #CAE742
analogous
#4278E7 #5F42E7 #B142E7
triadic
#5F42E7 #E75F42 #42E75F
tetradic
#5F42E7 #E74278 #CAE742 #42E7B1
square
#5F42E7 #E74278 #CAE742 #42E7B1
split-complementary
#5F42E7 #E7B142 #78E742
monochromatic
#2B149B #3B1BD1 #5F42E7 #8D78EE #BBAFF5

Accessibility & contrast

On white

6.14
#5F42E7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.42
#5F42E7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42E7
6.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42E7#FFFFFF#000000##FFFFFF
##5F42E71.006.143.426.14
#FFFFFF6.141.0021.001.00
#0000003.4221.001.0021.00
##FFFFFF6.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067EC
Deuteranopia (green-blind)
#005CE4
Tritanopia (blue-blind)
#006F91
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #5f42e7;
/* rgb */ color: rgb(95, 66, 231);
/* oklch */ color: oklch(51.9% 0.234 282.6);
Tailwind
colors: {
  custom: {
    50: '#9b79f0',
    500: '#5f42e7',
    950: '#000000',
  },
}
SCSS
$custom: #5f42e7;
$custom-light: #9b79f0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42e7",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 231
  },
  "hsl": {
    "h": 250.545,
    "s": 77.465,
    "l": 58.235
  },
  "oklch": {
    "l": 0.51878,
    "c": 0.23366,
    "h": 282.6
  },
  "luminance": 0.12099
}

Semantic roles & 50–950 ramp

primary
#5F42E7
secondary
#D8E3A2
accent
#F434D2
background
#FAF7FE
surface
#F4EEFD
border
#CEC9D5
text
#0F0917
muted
#7F7B85

Preview Lab

Preview with #5F42E7

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

Preview Lab → · Contrast checker → · Palette generator →

#5F42E7 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva