#5F42D2#5F42D2

#5F42D2 is a mid, highly saturated violet. Relative luminance 0.110; OKLCH L 50.0% C 0.209 H 285.2°. Best body text is #FFFFFF at 6.57:1 contrast (WCAG AA passes).

Color values

HEX#5F42D2
RGBrgb(95, 66, 210)
HSLhsl(252, 62%, 54%)
HSVhsv(252, 69%, 82%)
CMYKcmyk(54.8%, 68.6%, 0%, 17.6%)
CIE-LABlab(39.55, 49.27, -70.10)
CIE-LCHlch(39.55, 85.68, 305.10°)
OKLaboklab(50.02% 0.0549 -0.2016)
OKLCHoklch(50.02% 0.209 285.2)
XYZxyz(18.2969, 10.9814, 62.1158)
Luminance0.1098 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42D2 #B5D242
analogous
#426DD2 #5F42D2 #A742D2
triadic
#5F42D2 #D25F42 #42D25F
tetradic
#5F42D2 #D2426D #B5D242 #42D2A7
square
#5F42D2 #D2426D #B5D242 #42D2A7
split-complementary
#5F42D2 #D2A742 #6DD242
monochromatic
#311E7C #4429AD #5F42D2 #8973DE #B3A5EA

Accessibility & contrast

On white

6.57
#5F42D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.20
#5F42D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42D2
6.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42D2#FFFFFF#000000##FFFFFF
##5F42D21.006.573.206.57
#FFFFFF6.571.0021.001.00
#0000003.2021.001.0021.00
##FFFFFF6.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061D6
Deuteranopia (green-blind)
#0059CF
Tritanopia (blue-blind)
#2B6785
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #5f42d2;
/* rgb */ color: rgb(95, 66, 210);
/* oklch */ color: oklch(50.0% 0.209 285.2);
Tailwind
colors: {
  custom: {
    50: '#9779e1',
    500: '#5f42d2',
    950: '#000000',
  },
}
SCSS
$custom: #5f42d2;
$custom-light: #9779e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42d2",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 210
  },
  "hsl": {
    "h": 252.083,
    "s": 61.538,
    "l": 54.118
  },
  "oklch": {
    "l": 0.50022,
    "c": 0.20893,
    "h": 285.2
  },
  "luminance": 0.10982
}

Semantic roles & 50–950 ramp

primary
#5F42D2
secondary
#CAD799
accent
#E543C4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F42D2

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

Preview Lab → · Contrast checker → · Palette generator →

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