#5A42C8#5A42C8

#5A42C8 is a mid, vivid violet. Relative luminance 0.102; OKLCH L 48.7% C 0.197 H 284.6°. Best body text is #FFFFFF at 6.89:1 contrast (WCAG AA passes).

Color values

HEX#5A42C8
RGBrgb(90, 66, 200)
HSLhsl(251, 55%, 52%)
HSVhsv(251, 67%, 78%)
CMYKcmyk(55%, 67%, 0%, 21.6%)
CIE-LABlab(38.27, 45.50, -66.42)
CIE-LCHlch(38.27, 80.51, 304.41°)
OKLaboklab(48.74% 0.0496 -0.1909)
OKLCHoklch(48.74% 0.197 284.6)
XYZxyz(16.5868, 10.2393, 55.7347)
Luminance0.1024 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42C8 #B0C842
analogous
#426DC8 #5A42C8 #9D42C8
triadic
#5A42C8 #C85A42 #42C85A
tetradic
#5A42C8 #C8426D #B0C842 #42C89D
square
#5A42C8 #C8426D #B0C842 #42C89D
split-complementary
#5A42C8 #C89D42 #6DC842
monochromatic
#2E206F #422E9F #5A42C8 #8371D6 #ADA1E4

Accessibility & contrast

On white

6.89
#5A42C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.05
#5A42C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A42C8
6.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42C8#FFFFFF#000000##FFFFFF
##5A42C81.006.893.056.89
#FFFFFF6.891.0021.001.00
#0000003.0521.001.0021.00
##FFFFFF6.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECC
Deuteranopia (green-blind)
#0056C5
Tritanopia (blue-blind)
#28647F
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5a42c8;
/* rgb */ color: rgb(90, 66, 200);
/* oklch */ color: oklch(48.7% 0.197 284.6);
Tailwind
colors: {
  custom: {
    50: '#9378da',
    500: '#5a42c8',
    950: '#000000',
  },
}
SCSS
$custom: #5a42c8;
$custom-light: #9378da;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42c8",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 200
  },
  "hsl": {
    "h": 250.746,
    "s": 54.918,
    "l": 52.157
  },
  "oklch": {
    "l": 0.48736,
    "c": 0.19729,
    "h": 284.6
  },
  "luminance": 0.1024
}

Semantic roles & 50–950 ramp

primary
#5A42C8
secondary
#C6D096
accent
#DE4AC4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A42C8

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

Preview Lab → · Contrast checker → · Palette generator →

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