#7E31B2#7E31B2

#7E31B2 is a mid, vivid violet. Relative luminance 0.098; OKLCH L 48.6% C 0.196 H 307.9°. Best body text is #FFFFFF at 7.07:1 contrast (WCAG AA passes).

Color values

HEX#7E31B2
RGBrgb(126, 49, 178)
HSLhsl(276, 57%, 45%)
HSVhsv(276, 72%, 70%)
CMYKcmyk(29.2%, 72.5%, 0%, 30.2%)
CIE-LABlab(37.57, 54.84, -54.47)
CIE-LCHlch(37.57, 77.29, 315.19°)
OKLaboklab(48.62% 0.1203 -0.1545)
OKLCHoklch(48.62% 0.196 307.9)
XYZxyz(17.7367, 9.8469, 43.0771)
Luminance0.0985 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E31B2 #65B231
analogous
#3E31B2 #7E31B2 #B231A6
triadic
#7E31B2 #B27E31 #31B27E
tetradic
#7E31B2 #B23E31 #65B231 #31A6B2
square
#7E31B2 #B23E31 #65B231 #31A6B2
split-complementary
#7E31B2 #A6B231 #31B23E
monochromatic
#3A1752 #5C2482 #7E31B2 #9C51CF #B881DC

Accessibility & contrast

On white

7.07
#7E31B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.97
#7E31B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #7E31B2
7.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E31B2#FFFFFF#000000##FFFFFF
##7E31B21.007.072.977.07
#FFFFFF7.071.0021.001.00
#0000002.9721.001.0021.00
##FFFFFF7.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056B6
Deuteranopia (green-blind)
#0559AF
Tritanopia (blue-blind)
#764F6F
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #7e31b2;
/* rgb */ color: rgb(126, 49, 178);
/* oklch */ color: oklch(48.6% 0.196 307.9);
Tailwind
colors: {
  custom: {
    50: '#a870ca',
    500: '#7e31b2',
    950: '#000000',
  },
}
SCSS
$custom: #7e31b2;
$custom-light: #a870ca;
$custom-dark: #000000;
JSON
{
  "hex": "#7e31b2",
  "rgb": {
    "r": 126,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 275.814,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.48619,
    "c": 0.19582,
    "h": 307.9
  },
  "luminance": 0.09847
}

Semantic roles & 50–950 ramp

primary
#7E31B2
secondary
#98C579
accent
#E04885
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#100813
muted
#7F7B82

Preview Lab

Preview with #7E31B2

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

Preview Lab → · Contrast checker → · Palette generator →

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