#7E31C8#7E31C8

#7E31C8 is a mid, highly saturated violet. Relative luminance 0.108; OKLCH L 50.3% C 0.218 H 302.1°. Best body text is #FFFFFF at 6.64:1 contrast (WCAG AA passes).

Color values

HEX#7E31C8
RGBrgb(126, 49, 200)
HSLhsl(271, 61%, 49%)
HSVhsv(271, 76%, 78%)
CMYKcmyk(37%, 75.5%, 0%, 21.6%)
CIE-LABlab(39.25, 59.89, -64.66)
CIE-LCHlch(39.25, 88.13, 312.80°)
OKLaboklab(50.33% 0.1159 -0.1845)
OKLCHoklch(50.33% 0.218 302.1)
XYZxyz(20.1253, 10.8023, 55.6572)
Luminance0.1080 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E31C8 #7BC831
analogous
#3231C8 #7E31C8 #C831C7
triadic
#7E31C8 #C87E31 #31C87E
tetradic
#7E31C8 #C83231 #7BC831 #31C7C8
square
#7E31C8 #C83231 #7BC831 #31C7C8
split-complementary
#7E31C8 #C7C831 #31C832
monochromatic
#401966 #5F2597 #7E31C8 #9C5FD8 #BB90E4

Accessibility & contrast

On white

6.64
#7E31C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.16
#7E31C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E31C8
6.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E31C8#FFFFFF#000000##FFFFFF
##7E31C81.006.643.166.64
#FFFFFF6.641.0021.001.00
#0000003.1621.001.0021.00
##FFFFFF6.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BCC
Deuteranopia (green-blind)
#005CC5
Tritanopia (blue-blind)
#6E587B
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #7e31c8;
/* rgb */ color: rgb(126, 49, 200);
/* oklch */ color: oklch(50.3% 0.218 302.1);
Tailwind
colors: {
  custom: {
    50: '#aa71da',
    500: '#7e31c8',
    950: '#000000',
  },
}
SCSS
$custom: #7e31c8;
$custom-light: #aa71da;
$custom-dark: #000000;
JSON
{
  "hex": "#7e31c8",
  "rgb": {
    "r": 126,
    "g": 49,
    "b": 200
  },
  "hsl": {
    "h": 270.596,
    "s": 60.643,
    "l": 48.824
  },
  "oklch": {
    "l": 0.5033,
    "c": 0.21786,
    "h": 302.1
  },
  "luminance": 0.10802
}

Semantic roles & 50–950 ramp

primary
#7E31C8
secondary
#AACE86
accent
#E44492
background
#FBF7FD
surface
#F6EDFB
border
#D0C8D4
text
#110815
muted
#807B83

Preview Lab

Preview with #7E31C8

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

Preview Lab → · Contrast checker → · Palette generator →

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