#7E31A8#7E31A8

#7E31A8 is a mid, vivid violet. Relative luminance 0.095; OKLCH L 47.9% C 0.186 H 310.9°. Best body text is #FFFFFF at 7.26:1 contrast (WCAG AA passes).

Color values

HEX#7E31A8
RGBrgb(126, 49, 168)
HSLhsl(279, 55%, 43%)
HSVhsv(279, 71%, 66%)
CMYKcmyk(25%, 70.8%, 0%, 34.1%)
CIE-LABlab(36.85, 52.61, -49.66)
CIE-LCHlch(36.85, 72.34, 316.65°)
OKLaboklab(47.89% 0.1217 -0.1404)
OKLCHoklch(47.89% 0.186 310.9)
XYZxyz(16.7690, 9.4598, 37.9807)
Luminance0.0946 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E31A8 #5BA831
analogous
#4331A8 #7E31A8 #A83196
triadic
#7E31A8 #A87E31 #31A87E
tetradic
#7E31A8 #A84331 #5BA831 #3196A8
square
#7E31A8 #A84331 #5BA831 #3196A8
split-complementary
#7E31A8 #96A831 #31A843
monochromatic
#371549 #5A2379 #7E31A8 #9E4CCB #B77BD8

Accessibility & contrast

On white

7.26
#7E31A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.89
#7E31A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #7E31A8
7.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E31A8#FFFFFF#000000##FFFFFF
##7E31A81.007.262.897.26
#FFFFFF7.261.0021.001.00
#0000002.8921.001.0021.00
##FFFFFF7.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053AB
Deuteranopia (green-blind)
#1F58A5
Tritanopia (blue-blind)
#794B69
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #7e31a8;
/* rgb */ color: rgb(126, 49, 168);
/* oklch */ color: oklch(47.9% 0.186 310.9);
Tailwind
colors: {
  custom: {
    50: '#a770c3',
    500: '#7e31a8',
    950: '#000000',
  },
}
SCSS
$custom: #7e31a8;
$custom-light: #a770c3;
$custom-dark: #000000;
JSON
{
  "hex": "#7e31a8",
  "rgb": {
    "r": 126,
    "g": 49,
    "b": 168
  },
  "hsl": {
    "h": 278.824,
    "s": 54.839,
    "l": 42.549
  },
  "oklch": {
    "l": 0.47888,
    "c": 0.1858,
    "h": 310.9
  },
  "luminance": 0.09459
}

Semantic roles & 50–950 ramp

primary
#7E31A8
secondary
#8FC174
accent
#DE4A7E
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#100812
muted
#7F7B81

Preview Lab

Preview with #7E31A8

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

Preview Lab → · Contrast checker → · Palette generator →

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