#5F42D7#5F42D7

#5F42D7 is a mid, highly saturated violet. Relative luminance 0.112; OKLCH L 50.5% C 0.215 H 284.6°. Best body text is #FFFFFF at 6.47:1 contrast (WCAG AA passes).

Color values

HEX#5F42D7
RGBrgb(95, 66, 215)
HSLhsl(252, 65%, 55%)
HSVhsv(252, 69%, 84%)
CMYKcmyk(55.8%, 69.3%, 0%, 15.7%)
CIE-LABlab(39.97, 50.73, -72.28)
CIE-LCHlch(39.97, 88.31, 305.06°)
OKLaboklab(50.46% 0.0541 -0.208)
OKLCHoklch(50.46% 0.215 284.6)
XYZxyz(18.9295, 11.2345, 65.4478)
Luminance0.1124 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42D7 #BAD742
analogous
#426FD7 #5F42D7 #AA42D7
triadic
#5F42D7 #D75F42 #42D75F
tetradic
#5F42D7 #D7426F #BAD742 #42D7AA
square
#5F42D7 #D7426F #BAD742 #42D7AA
split-complementary
#5F42D7 #D7AA42 #6FD742
monochromatic
#301C83 #4226B5 #5F42D7 #8A75E2 #B5A7EC

Accessibility & contrast

On white

6.47
#5F42D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.25
#5F42D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42D7
6.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42D7#FFFFFF#000000##FFFFFF
##5F42D71.006.473.256.47
#FFFFFF6.471.0021.001.00
#0000003.2521.001.0021.00
##FFFFFF6.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062DB
Deuteranopia (green-blind)
#0059D4
Tritanopia (blue-blind)
#246988
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5f42d7;
/* rgb */ color: rgb(95, 66, 215);
/* oklch */ color: oklch(50.5% 0.215 284.6);
Tailwind
colors: {
  custom: {
    50: '#9879e4',
    500: '#5f42d7',
    950: '#000000',
  },
}
SCSS
$custom: #5f42d7;
$custom-light: #9879e4;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42d7",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 215
  },
  "hsl": {
    "h": 251.678,
    "s": 65.066,
    "l": 55.098
  },
  "oklch": {
    "l": 0.50455,
    "c": 0.21489,
    "h": 284.6
  },
  "luminance": 0.11236
}

Semantic roles & 50–950 ramp

primary
#5F42D7
secondary
#CDDA9B
accent
#E840C7
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42D7

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

Preview Lab → · Contrast checker → · Palette generator →

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