#5A42C2#5A42C2

#5A42C2 is a mid, vivid violet. Relative luminance 0.100; OKLCH L 48.2% C 0.190 H 285.4°. Best body text is #FFFFFF at 7.02:1 contrast (WCAG AA passes).

Color values

HEX#5A42C2
RGBrgb(90, 66, 194)
HSLhsl(251, 51%, 51%)
HSVhsv(251, 66%, 76%)
CMYKcmyk(53.6%, 66%, 0%, 23.9%)
CIE-LABlab(37.78, 43.69, -63.72)
CIE-LCHlch(37.78, 77.26, 304.44°)
OKLaboklab(48.23% 0.0504 -0.183)
OKLCHoklch(48.23% 0.19 285.4)
XYZxyz(15.8993, 9.9643, 52.1140)
Luminance0.0997 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A42C2 #AAC242
analogous
#426AC2 #5A42C2 #9A42C2
triadic
#5A42C2 #C25A42 #42C25A
tetradic
#5A42C2 #C2426A #AAC242 #42C29A
square
#5A42C2 #C2426A #AAC242 #42C29A
split-complementary
#5A42C2 #C29A42 #6AC242
monochromatic
#2F2268 #443196 #5A42C2 #8270D1 #AB9FE0

Accessibility & contrast

On white

7.02
#5A42C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.99
#5A42C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A42C2
7.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A42C2#FFFFFF#000000##FFFFFF
##5A42C21.007.022.997.02
#FFFFFF7.021.0021.001.00
#0000002.9921.001.0021.00
##FFFFFF7.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CC6
Deuteranopia (green-blind)
#0055BF
Tritanopia (blue-blind)
#2E627C
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5a42c2;
/* rgb */ color: rgb(90, 66, 194);
/* oklch */ color: oklch(48.2% 0.190 285.4);
Tailwind
colors: {
  custom: {
    50: '#9278d5',
    500: '#5a42c2',
    950: '#000000',
  },
}
SCSS
$custom: #5a42c2;
$custom-light: #9278d5;
$custom-dark: #000000;
JSON
{
  "hex": "#5a42c2",
  "rgb": {
    "r": 90,
    "g": 66,
    "b": 194
  },
  "hsl": {
    "h": 251.25,
    "s": 51.2,
    "l": 50.98
  },
  "oklch": {
    "l": 0.4823,
    "c": 0.18984,
    "h": 285.4
  },
  "luminance": 0.09965
}

Semantic roles & 50–950 ramp

primary
#5A42C2
secondary
#C2CC94
accent
#DB4DC0
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5A42C2

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

Preview Lab → · Contrast checker → · Palette generator →

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