#5F42E2#5F42E2

#5F42E2 is a mid, highly saturated violet. Relative luminance 0.118; OKLCH L 51.4% C 0.228 H 283.2°. Best body text is #FFFFFF at 6.24:1 contrast (WCAG AA passes).

Color values

HEX#5F42E2
RGBrgb(95, 66, 226)
HSLhsl(251, 73%, 57%)
HSVhsv(251, 71%, 89%)
CMYKcmyk(58%, 70.8%, 0%, 11.4%)
CIE-LABlab(40.93, 53.94, -77.01)
CIE-LCHlch(40.93, 94.02, 305.01°)
OKLaboklab(51.43% 0.052 -0.2218)
OKLCHoklch(51.43% 0.228 283.2)
XYZxyz(20.3908, 11.8190, 73.1436)
Luminance0.1182 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42E2 #C5E242
analogous
#4275E2 #5F42E2 #AF42E2
triadic
#5F42E2 #E25F42 #42E25F
tetradic
#5F42E2 #E24275 #C5E242 #42E2AF
square
#5F42E2 #E24275 #C5E242 #42E2AF
split-complementary
#5F42E2 #E2AF42 #75E242
monochromatic
#2D1793 #3D1FC8 #5F42E2 #8C77EA #B9ACF2

Accessibility & contrast

On white

6.24
#5F42E2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.36
#5F42E2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42E2
6.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42E2#FFFFFF#000000##FFFFFF
##5F42E21.006.243.366.24
#FFFFFF6.241.0021.001.00
#0000003.3621.001.0021.00
##FFFFFF6.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065E7
Deuteranopia (green-blind)
#005BDF
Tritanopia (blue-blind)
#0C6D8E
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #5f42e2;
/* rgb */ color: rgb(95, 66, 226);
/* oklch */ color: oklch(51.4% 0.228 283.2);
Tailwind
colors: {
  custom: {
    50: '#9a79ec',
    500: '#5f42e2',
    950: '#000000',
  },
}
SCSS
$custom: #5f42e2;
$custom-light: #9a79ec;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42e2",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 226
  },
  "hsl": {
    "h": 250.875,
    "s": 73.394,
    "l": 57.255
  },
  "oklch": {
    "l": 0.51427,
    "c": 0.22785,
    "h": 283.2
  },
  "luminance": 0.1182
}

Semantic roles & 50–950 ramp

primary
#5F42E2
secondary
#D5E09F
accent
#F038CF
background
#FAF7FE
surface
#F4EEFD
border
#CEC9D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42E2

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

Preview Lab → · Contrast checker → · Palette generator →

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