#5F42D8#5F42D8

#5F42D8 is a mid, highly saturated violet. Relative luminance 0.113; OKLCH L 50.5% C 0.216 H 284.4°. Best body text is #FFFFFF at 6.45:1 contrast (WCAG AA passes).

Color values

HEX#5F42D8
RGBrgb(95, 66, 216)
HSLhsl(252, 66%, 55%)
HSVhsv(252, 69%, 85%)
CMYKcmyk(56%, 69.4%, 0%, 15.3%)
CIE-LABlab(40.06, 51.02, -72.72)
CIE-LCHlch(40.06, 88.83, 305.06°)
OKLaboklab(50.54% 0.0539 -0.2093)
OKLCHoklch(50.54% 0.216 284.4)
XYZxyz(19.0584, 11.2861, 66.1266)
Luminance0.1129 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42D8 #BBD842
analogous
#4270D8 #5F42D8 #AA42D8
triadic
#5F42D8 #D85F42 #42D85F
tetradic
#5F42D8 #D84270 #BBD842 #42D8AA
square
#5F42D8 #D84270 #BBD842 #42D8AA
split-complementary
#5F42D8 #D8AA42 #70D842
monochromatic
#301B84 #4226B7 #5F42D8 #8A75E2 #B5A7ED

Accessibility & contrast

On white

6.45
#5F42D8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.26
#5F42D8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42D8
6.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42D8#FFFFFF#000000##FFFFFF
##5F42D81.006.453.266.45
#FFFFFF6.451.0021.001.00
#0000003.2621.001.0021.00
##FFFFFF6.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063DC
Deuteranopia (green-blind)
#005AD5
Tritanopia (blue-blind)
#236A88
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5f42d8;
/* rgb */ color: rgb(95, 66, 216);
/* oklch */ color: oklch(50.5% 0.216 284.4);
Tailwind
colors: {
  custom: {
    50: '#9879e5',
    500: '#5f42d8',
    950: '#000000',
  },
}
SCSS
$custom: #5f42d8;
$custom-light: #9879e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42d8",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 216
  },
  "hsl": {
    "h": 251.6,
    "s": 65.789,
    "l": 55.294
  },
  "oklch": {
    "l": 0.50542,
    "c": 0.21609,
    "h": 284.4
  },
  "luminance": 0.11287
}

Semantic roles & 50–950 ramp

primary
#5F42D8
secondary
#CEDA9C
accent
#E93FC8
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42D8

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

Preview Lab → · Contrast checker → · Palette generator →

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