#7E31B5#7E31B5

#7E31B5 is a mid, vivid violet. Relative luminance 0.100; OKLCH L 48.8% C 0.199 H 307.0°. Best body text is #FFFFFF at 7.01:1 contrast (WCAG AA passes).

Color values

HEX#7E31B5
RGBrgb(126, 49, 181)
HSLhsl(275, 57%, 45%)
HSVhsv(275, 73%, 71%)
CMYKcmyk(30.4%, 72.9%, 0%, 29%)
CIE-LABlab(37.79, 55.51, -55.89)
CIE-LCHlch(37.79, 78.77, 314.81°)
OKLaboklab(48.84% 0.1198 -0.1587)
OKLCHoklch(48.84% 0.199 307)
XYZxyz(18.0412, 9.9687, 44.6808)
Luminance0.0997 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E31B5 #68B531
analogous
#3C31B5 #7E31B5 #B531AA
triadic
#7E31B5 #B57E31 #31B57E
tetradic
#7E31B5 #B53C31 #68B531 #31AAB5
square
#7E31B5 #B53C31 #68B531 #31AAB5
split-complementary
#7E31B5 #AAB531 #31B53C
monochromatic
#3B1755 #5C2485 #7E31B5 #9C53D0 #B883DD

Accessibility & contrast

On white

7.01
#7E31B5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.99
#7E31B5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #7E31B5
7.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E31B5#FFFFFF#000000##FFFFFF
##7E31B51.007.012.997.01
#FFFFFF7.011.0021.001.00
#0000002.9921.001.0021.00
##FFFFFF7.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056B9
Deuteranopia (green-blind)
#0059B2
Tritanopia (blue-blind)
#755070
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #7e31b5;
/* rgb */ color: rgb(126, 49, 181);
/* oklch */ color: oklch(48.8% 0.199 307.0);
Tailwind
colors: {
  custom: {
    50: '#a870cc',
    500: '#7e31b5',
    950: '#000000',
  },
}
SCSS
$custom: #7e31b5;
$custom-light: #a870cc;
$custom-dark: #000000;
JSON
{
  "hex": "#7e31b5",
  "rgb": {
    "r": 126,
    "g": 49,
    "b": 181
  },
  "hsl": {
    "h": 275,
    "s": 57.391,
    "l": 45.098
  },
  "oklch": {
    "l": 0.48844,
    "c": 0.19882,
    "h": 307
  },
  "luminance": 0.09968
}

Semantic roles & 50–950 ramp

primary
#7E31B5
secondary
#9BC77B
accent
#E14787
background
#FAF7FC
surface
#F4EDF9
border
#CEC8D2
text
#100813
muted
#7F7B82

Preview Lab

Preview with #7E31B5

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

Preview Lab → · Contrast checker → · Palette generator →

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