#5F42D6#5F42D6

#5F42D6 is a mid, highly saturated violet. Relative luminance 0.112; OKLCH L 50.4% C 0.214 H 284.7°. Best body text is #FFFFFF at 6.49:1 contrast (WCAG AA passes).

Color values

HEX#5F42D6
RGBrgb(95, 66, 214)
HSLhsl(252, 64%, 55%)
HSVhsv(252, 69%, 84%)
CMYKcmyk(55.6%, 69.2%, 0%, 16.1%)
CIE-LABlab(39.89, 50.44, -71.85)
CIE-LCHlch(39.89, 87.78, 305.07°)
OKLaboklab(50.37% 0.0542 -0.2067)
OKLCHoklch(50.37% 0.214 284.7)
XYZxyz(18.8014, 11.1833, 64.7732)
Luminance0.1118 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42D6 #B9D642
analogous
#426FD6 #5F42D6 #A942D6
triadic
#5F42D6 #D65F42 #42D65F
tetradic
#5F42D6 #D6426F #B9D642 #42D6A9
square
#5F42D6 #D6426F #B9D642 #42D6A9
split-complementary
#5F42D6 #D6A942 #6FD642
monochromatic
#301C82 #4327B4 #5F42D6 #8A74E1 #B4A7EC

Accessibility & contrast

On white

6.49
#5F42D6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.24
#5F42D6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42D6
6.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42D6#FFFFFF#000000##FFFFFF
##5F42D61.006.493.246.49
#FFFFFF6.491.0021.001.00
#0000003.2421.001.0021.00
##FFFFFF6.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062DA
Deuteranopia (green-blind)
#0059D3
Tritanopia (blue-blind)
#266987
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5f42d6;
/* rgb */ color: rgb(95, 66, 214);
/* oklch */ color: oklch(50.4% 0.214 284.7);
Tailwind
colors: {
  custom: {
    50: '#9879e4',
    500: '#5f42d6',
    950: '#000000',
  },
}
SCSS
$custom: #5f42d6;
$custom-light: #9879e4;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42d6",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 214
  },
  "hsl": {
    "h": 251.757,
    "s": 64.348,
    "l": 54.902
  },
  "oklch": {
    "l": 0.50368,
    "c": 0.21371,
    "h": 284.7
  },
  "luminance": 0.11184
}

Semantic roles & 50–950 ramp

primary
#5F42D6
secondary
#CDD99B
accent
#E740C7
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42D6

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

Preview Lab → · Contrast checker → · Palette generator →

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