#5F42E0#5F42E0

#5F42E0 is a mid, highly saturated violet. Relative luminance 0.117; OKLCH L 51.2% C 0.226 H 283.4°. Best body text is #FFFFFF at 6.28:1 contrast (WCAG AA passes).

Color values

HEX#5F42E0
RGBrgb(95, 66, 224)
HSLhsl(251, 72%, 57%)
HSVhsv(251, 71%, 88%)
CMYKcmyk(57.6%, 70.5%, 0%, 12.2%)
CIE-LABlab(40.75, 53.36, -76.16)
CIE-LCHlch(40.75, 92.99, 305.02°)
OKLaboklab(51.25% 0.0524 -0.2193)
OKLCHoklch(51.25% 0.226 283.4)
XYZxyz(20.1179, 11.7099, 71.7067)
Luminance0.1171 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42E0 #C3E042
analogous
#4274E0 #5F42E0 #AE42E0
triadic
#5F42E0 #E05F42 #42E05F
tetradic
#5F42E0 #E04274 #C3E042 #42E0AE
square
#5F42E0 #E04274 #C3E042 #42E0AE
split-complementary
#5F42E0 #E0AE42 #74E042
monochromatic
#2E1890 #3E20C5 #5F42E0 #8C77E9 #B8ABF1

Accessibility & contrast

On white

6.28
#5F42E0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.34
#5F42E0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42E0
6.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42E0#FFFFFF#000000##FFFFFF
##5F42E01.006.283.346.28
#FFFFFF6.281.0021.001.00
#0000003.3421.001.0021.00
##FFFFFF6.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065E5
Deuteranopia (green-blind)
#005BDD
Tritanopia (blue-blind)
#126D8D
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #5f42e0;
/* rgb */ color: rgb(95, 66, 224);
/* oklch */ color: oklch(51.2% 0.226 283.4);
Tailwind
colors: {
  custom: {
    50: '#9979eb',
    500: '#5f42e0',
    950: '#000000',
  },
}
SCSS
$custom: #5f42e0;
$custom-light: #9979eb;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42e0",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 224
  },
  "hsl": {
    "h": 251.013,
    "s": 71.818,
    "l": 56.863
  },
  "oklch": {
    "l": 0.51249,
    "c": 0.22552,
    "h": 283.4
  },
  "luminance": 0.11711
}

Semantic roles & 50–950 ramp

primary
#5F42E0
secondary
#D3DF9F
accent
#EF39CD
background
#FAF7FE
surface
#F4EEFD
border
#CEC9D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42E0

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

Preview Lab → · Contrast checker → · Palette generator →

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