#5F42DB#5F42DB

#5F42DB is a mid, highly saturated violet. Relative luminance 0.114; OKLCH L 50.8% C 0.220 H 284.1°. Best body text is #FFFFFF at 6.39:1 contrast (WCAG AA passes).

Color values

HEX#5F42DB
RGBrgb(95, 66, 219)
HSLhsl(251, 68%, 56%)
HSVhsv(251, 70%, 86%)
CMYKcmyk(56.6%, 69.9%, 0%, 14.1%)
CIE-LABlab(40.32, 51.90, -74.01)
CIE-LCHlch(40.32, 90.40, 305.04°)
OKLaboklab(50.81% 0.0534 -0.2131)
OKLCHoklch(50.81% 0.22 284.1)
XYZxyz(19.4498, 11.4426, 68.1879)
Luminance0.1144 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F42DB #BEDB42
analogous
#4271DB #5F42DB #AC42DB
triadic
#5F42DB #DB5F42 #42DB5F
tetradic
#5F42DB #DB4271 #BEDB42 #42DBAC
square
#5F42DB #DB4271 #BEDB42 #42DBAC
split-complementary
#5F42DB #DBAC42 #71DB42
monochromatic
#2F1A89 #4124BC #5F42DB #8B75E5 #B6A9EF

Accessibility & contrast

On white

6.39
#5F42DB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.29
#5F42DB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F42DB
6.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F42DB#FFFFFF#000000##FFFFFF
##5F42DB1.006.393.296.39
#FFFFFF6.391.0021.001.00
#0000003.2921.001.0021.00
##FFFFFF6.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064E0
Deuteranopia (green-blind)
#005AD8
Tritanopia (blue-blind)
#1E6B8A
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #5f42db;
/* rgb */ color: rgb(95, 66, 219);
/* oklch */ color: oklch(50.8% 0.220 284.1);
Tailwind
colors: {
  custom: {
    50: '#9979e7',
    500: '#5f42db',
    950: '#000000',
  },
}
SCSS
$custom: #5f42db;
$custom-light: #9979e7;
$custom-dark: #000000;
JSON
{
  "hex": "#5f42db",
  "rgb": {
    "r": 95,
    "g": 66,
    "b": 219
  },
  "hsl": {
    "h": 251.373,
    "s": 68,
    "l": 55.882
  },
  "oklch": {
    "l": 0.50806,
    "c": 0.21964,
    "h": 284.1
  },
  "luminance": 0.11444
}

Semantic roles & 50–950 ramp

primary
#5F42DB
secondary
#D0DC9D
accent
#EB3DCA
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F42DB

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

Preview Lab → · Contrast checker → · Palette generator →

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