#5F42E1#5F42E1

#5F42E1 is a mid, highly saturated violet. Relative luminance 0.118; OKLCH L 51.3% C 0.227 H 283.3°. Best body text is #FFFFFF at 6.26:1 contrast (WCAG AA passes).

Color values

HEX#5F42E1
RGBrgb(95, 66, 225)
HSLhsl(251, 73%, 57%)
HSVhsv(251, 71%, 88%)
CMYKcmyk(57.8%, 70.7%, 0%, 11.8%)
CIE-LABlab(40.84, 53.65, -76.58)
CIE-LCHlch(40.84, 93.51, 305.01°)
OKLaboklab(51.34% 0.0522 -0.2206)
OKLCHoklch(51.34% 0.227 283.3)
XYZxyz(20.2539, 11.7643, 72.4230)
Luminance0.1177 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42E1 #C4E142
analogous
#4275E1 #5F42E1 #AE42E1
triadic
#5F42E1 #E15F42 #42E15F
tetradic
#5F42E1 #E14275 #C4E142 #42E1AE
square
#5F42E1 #E14275 #C4E142 #42E1AE
split-complementary
#5F42E1 #E1AE42 #75E142
monochromatic
#2D1792 #3E1FC6 #5F42E1 #8C77E9 #B8ACF2

Accessibility & contrast

On white

6.26
#5F42E1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.35
#5F42E1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42E1
6.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42E1#FFFFFF#000000##FFFFFF
##5F42E11.006.263.356.26
#FFFFFF6.261.0021.001.00
#0000003.3521.001.0021.00
##FFFFFF6.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065E6
Deuteranopia (green-blind)
#005BDE
Tritanopia (blue-blind)
#0F6D8D
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #5f42e1;
/* rgb */ color: rgb(95, 66, 225);
/* oklch */ color: oklch(51.3% 0.227 283.3);
Tailwind
colors: {
  custom: {
    50: '#9a79ec',
    500: '#5f42e1',
    950: '#000000',
  },
}
SCSS
$custom: #5f42e1;
$custom-light: #9a79ec;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42e1",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 225
  },
  "hsl": {
    "h": 250.943,
    "s": 72.603,
    "l": 57.059
  },
  "oklch": {
    "l": 0.51338,
    "c": 0.22669,
    "h": 283.3
  },
  "luminance": 0.11766
}

Semantic roles & 50–950 ramp

primary
#5F42E1
secondary
#D4E09F
accent
#EF38CE
background
#FAF7FE
surface
#F4EEFD
border
#CEC9D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42E1

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

Preview Lab → · Contrast checker → · Palette generator →

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