#5F42D4#5F42D4

#5F42D4 is a mid, highly saturated violet. Relative luminance 0.111; OKLCH L 50.2% C 0.211 H 285.0°. Best body text is #FFFFFF at 6.53:1 contrast (WCAG AA passes).

Color values

HEX#5F42D4
RGBrgb(95, 66, 212)
HSLhsl(252, 63%, 55%)
HSVhsv(252, 69%, 83%)
CMYKcmyk(55.2%, 68.9%, 0%, 16.9%)
CIE-LABlab(39.72, 49.85, -70.98)
CIE-LCHlch(39.72, 86.73, 305.08°)
OKLaboklab(50.19% 0.0546 -0.2041)
OKLCHoklch(50.19% 0.211 285)
XYZxyz(18.5476, 11.0817, 63.4362)
Luminance0.1108 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42D4 #B7D442
analogous
#426ED4 #5F42D4 #A842D4
triadic
#5F42D4 #D45F42 #42D45F
tetradic
#5F42D4 #D4426E #B7D442 #42D4A8
square
#5F42D4 #D4426E #B7D442 #42D4A8
split-complementary
#5F42D4 #D4A842 #6ED442
monochromatic
#301D7F #4328B1 #5F42D4 #8974DF #B3A6EB

Accessibility & contrast

On white

6.53
#5F42D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.22
#5F42D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42D4
6.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42D4#FFFFFF#000000##FFFFFF
##5F42D41.006.533.226.53
#FFFFFF6.531.0021.001.00
#0000003.2221.001.0021.00
##FFFFFF6.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062D8
Deuteranopia (green-blind)
#0059D1
Tritanopia (blue-blind)
#296886
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5f42d4;
/* rgb */ color: rgb(95, 66, 212);
/* oklch */ color: oklch(50.2% 0.211 285.0);
Tailwind
colors: {
  custom: {
    50: '#9879e2',
    500: '#5f42d4',
    950: '#000000',
  },
}
SCSS
$custom: #5f42d4;
$custom-light: #9879e2;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42d4",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 212
  },
  "hsl": {
    "h": 251.918,
    "s": 62.931,
    "l": 54.51
  },
  "oklch": {
    "l": 0.50194,
    "c": 0.21132,
    "h": 285
  },
  "luminance": 0.11083
}

Semantic roles & 50–950 ramp

primary
#5F42D4
secondary
#CCD89A
accent
#E642C5
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42D4

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

Preview Lab → · Contrast checker → · Palette generator →

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