#842ED7#842ED7

#842ED7 is a mid, highly saturated violet. Relative luminance 0.118; OKLCH L 52.0% C 0.236 H 301.3°. Best body text is #FFFFFF at 6.26:1 contrast (WCAG AA passes).

Color values

HEX#842ED7
RGBrgb(132, 46, 215)
HSLhsl(271, 68%, 51%)
HSVhsv(271, 79%, 84%)
CMYKcmyk(38.6%, 78.6%, 0%, 15.7%)
CIE-LABlab(40.84, 65.46, -70.70)
CIE-LCHlch(40.84, 96.35, 312.80°)
OKLaboklab(51.99% 0.1229 -0.202)
OKLCHoklch(51.99% 0.236 301.3)
XYZxyz(22.7554, 11.7657, 65.3490)
Luminance0.1177 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#842ED7 #81D72E
analogous
#2F2ED7 #842ED7 #D72ED5
triadic
#842ED7 #D7842E #2ED784
tetradic
#842ED7 #D72F2E #81D72E #2ED5D7
square
#842ED7 #D72F2E #81D72E #2ED5D7
split-complementary
#842ED7 #D5D72E #2ED72F
monochromatic
#461674 #6520A8 #842ED7 #A261E1 #C095EB

Accessibility & contrast

On white

6.26
#842ED7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.35
#842ED7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #842ED7
6.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##842ED7#FFFFFF#000000##FFFFFF
##842ED71.006.263.356.26
#FFFFFF6.261.0021.001.00
#0000003.3521.001.0021.00
##FFFFFF6.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FDC
Deuteranopia (green-blind)
#005FD4
Tritanopia (blue-blind)
#715C83
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #842ed7;
/* rgb */ color: rgb(132, 46, 215);
/* oklch */ color: oklch(52.0% 0.236 301.3);
Tailwind
colors: {
  custom: {
    50: '#af71e4',
    500: '#842ed7',
    950: '#000000',
  },
}
SCSS
$custom: #842ed7;
$custom-light: #af71e4;
$custom-dark: #000000;
JSON
{
  "hex": "#842ed7",
  "rgb": {
    "r": 132,
    "g": 46,
    "b": 215
  },
  "hsl": {
    "h": 270.533,
    "s": 67.871,
    "l": 51.176
  },
  "oklch": {
    "l": 0.51991,
    "c": 0.23645,
    "h": 301.3
  },
  "luminance": 0.11766
}

Semantic roles & 50–950 ramp

primary
#842ED7
secondary
#B0D68B
accent
#EB3D92
background
#FBF7FE
surface
#F6EDFC
border
#D0C8D5
text
#110816
muted
#807B84

Preview Lab

Preview with #842ED7

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

Preview Lab → · Contrast checker → · Palette generator →

#842ED7 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva