#5F42CE#5F42CE

#5F42CE is a mid, highly saturated violet. Relative luminance 0.108; OKLCH L 49.7% C 0.204 H 285.8°. Best body text is #FFFFFF at 6.65:1 contrast (WCAG AA passes).

Color values

HEX#5F42CE
RGBrgb(95, 66, 206)
HSLhsl(252, 59%, 53%)
HSVhsv(252, 68%, 81%)
CMYKcmyk(53.9%, 68%, 0%, 19.2%)
CIE-LABlab(39.22, 48.09, -68.33)
CIE-LCHlch(39.22, 83.56, 305.14°)
OKLaboklab(49.68% 0.0556 -0.1964)
OKLCHoklch(49.68% 0.204 285.8)
XYZxyz(17.8048, 10.7846, 59.5240)
Luminance0.1079 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42CE #B1CE42
analogous
#426BCE #5F42CE #A542CE
triadic
#5F42CE #CE5F42 #42CE5F
tetradic
#5F42CE #CE426B #B1CE42 #42CEA5
square
#5F42CE #CE426B #B1CE42 #42CEA5
split-complementary
#5F42CE #CEA542 #6BCE42
monochromatic
#311F77 #452BA7 #5F42CE #8873DB #B1A3E7

Accessibility & contrast

On white

6.65
#5F42CE on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.16
#5F42CE on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42CE
6.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42CE#FFFFFF#000000##FFFFFF
##5F42CE1.006.653.166.65
#FFFFFF6.651.0021.001.00
#0000003.1621.001.0021.00
##FFFFFF6.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060D2
Deuteranopia (green-blind)
#0058CB
Tritanopia (blue-blind)
#306683
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5f42ce;
/* rgb */ color: rgb(95, 66, 206);
/* oklch */ color: oklch(49.7% 0.204 285.8);
Tailwind
colors: {
  custom: {
    50: '#9779de',
    500: '#5f42ce',
    950: '#000000',
  },
}
SCSS
$custom: #5f42ce;
$custom-light: #9779de;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42ce",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 206
  },
  "hsl": {
    "h": 252.429,
    "s": 58.824,
    "l": 53.333
  },
  "oklch": {
    "l": 0.49679,
    "c": 0.20411,
    "h": 285.8
  },
  "luminance": 0.10786
}

Semantic roles & 50–950 ramp

primary
#5F42CE
secondary
#C8D498
accent
#E246C2
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F42CE

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

Preview Lab → · Contrast checker → · Palette generator →

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