#7E31A2#7E31A2

#7E31A2 is a mid, vivid purple. Relative luminance 0.092; OKLCH L 47.5% C 0.180 H 312.9°. Best body text is #FFFFFF at 7.37:1 contrast (WCAG AA passes).

Color values

HEX#7E31A2
RGBrgb(126, 49, 162)
HSLhsl(281, 54%, 41%)
HSVhsv(281, 70%, 64%)
CMYKcmyk(22.2%, 69.8%, 0%, 36.5%)
CIE-LABlab(36.45, 51.30, -46.72)
CIE-LCHlch(36.45, 69.38, 317.68°)
OKLaboklab(47.47% 0.1223 -0.1318)
OKLCHoklch(47.47% 0.18 312.9)
XYZxyz(16.2229, 9.2414, 35.1046)
Luminance0.0924 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E31A2 #55A231
analogous
#4631A2 #7E31A2 #A2318E
triadic
#7E31A2 #A27E31 #31A27E
tetradic
#7E31A2 #A24631 #55A231 #318EA2
square
#7E31A2 #A24631 #55A231 #318EA2
split-complementary
#7E31A2 #8EA231 #31A246
monochromatic
#351544 #592373 #7E31A2 #9F48C8 #B877D6

Accessibility & contrast

On white

7.37
#7E31A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.85
#7E31A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #7E31A2
7.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E31A2#FFFFFF#000000##FFFFFF
##7E31A21.007.372.857.37
#FFFFFF7.371.0021.001.00
#0000002.8521.001.0021.00
##FFFFFF7.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052A5
Deuteranopia (green-blind)
#27579F
Tritanopia (blue-blind)
#7A4866
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #7e31a2;
/* rgb */ color: rgb(126, 49, 162);
/* oklch */ color: oklch(47.5% 0.180 312.9);
Tailwind
colors: {
  custom: {
    50: '#a770be',
    500: '#7e31a2',
    950: '#000000',
  },
}
SCSS
$custom: #7e31a2;
$custom-light: #a770be;
$custom-dark: #000000;
JSON
{
  "hex": "#7e31a2",
  "rgb": {
    "r": 126,
    "g": 49,
    "b": 162
  },
  "hsl": {
    "h": 280.885,
    "s": 53.555,
    "l": 41.373
  },
  "oklch": {
    "l": 0.47465,
    "c": 0.1798,
    "h": 312.9
  },
  "luminance": 0.09241
}

Semantic roles & 50–950 ramp

primary
#7E31A2
secondary
#89BE71
accent
#DD4B79
background
#FAF7FB
surface
#F4EDF7
border
#CEC8D0
text
#100812
muted
#7F7B81

Preview Lab

Preview with #7E31A2

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

Preview Lab → · Contrast checker → · Palette generator →

#7E31A2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva