#7E31B8#7E31B8

#7E31B8 is a mid, highly saturated violet. Relative luminance 0.101; OKLCH L 49.1% C 0.202 H 306.2°. Best body text is #FFFFFF at 6.96:1 contrast (WCAG AA passes).

Color values

HEX#7E31B8
RGBrgb(126, 49, 184)
HSLhsl(274, 58%, 46%)
HSVhsv(274, 73%, 72%)
CMYKcmyk(31.5%, 73.4%, 0%, 27.8%)
CIE-LABlab(38.01, 56.20, -57.30)
CIE-LCHlch(38.01, 80.26, 314.44°)
OKLaboklab(49.07% 0.1192 -0.1628)
OKLCHoklch(49.07% 0.202 306.2)
XYZxyz(18.3523, 10.0931, 46.3194)
Luminance0.1009 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E31B8 #6BB831
analogous
#3A31B8 #7E31B8 #B831AE
triadic
#7E31B8 #B87E31 #31B87E
tetradic
#7E31B8 #B83A31 #6BB831 #31AEB8
square
#7E31B8 #B83A31 #6BB831 #31AEB8
split-complementary
#7E31B8 #AEB831 #31B83A
monochromatic
#3C1757 #5D2488 #7E31B8 #9C55D2 #B885DE

Accessibility & contrast

On white

6.96
#7E31B8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.02
#7E31B8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E31B8
6.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E31B8#FFFFFF#000000##FFFFFF
##7E31B81.006.963.026.96
#FFFFFF6.961.0021.001.00
#0000003.0221.001.0021.00
##FFFFFF6.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057BC
Deuteranopia (green-blind)
#005AB5
Tritanopia (blue-blind)
#745172
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #7e31b8;
/* rgb */ color: rgb(126, 49, 184);
/* oklch */ color: oklch(49.1% 0.202 306.2);
Tailwind
colors: {
  custom: {
    50: '#a870ce',
    500: '#7e31b8',
    950: '#000000',
  },
}
SCSS
$custom: #7e31b8;
$custom-light: #a870ce;
$custom-dark: #000000;
JSON
{
  "hex": "#7e31b8",
  "rgb": {
    "r": 126,
    "g": 49,
    "b": 184
  },
  "hsl": {
    "h": 274.222,
    "s": 57.94,
    "l": 45.686
  },
  "oklch": {
    "l": 0.49072,
    "c": 0.20183,
    "h": 306.2
  },
  "luminance": 0.10093
}

Semantic roles & 50–950 ramp

primary
#7E31B8
secondary
#9DC87D
accent
#E14789
background
#FAF7FC
surface
#F4EDF9
border
#CEC8D2
text
#100814
muted
#7F7B82

Preview Lab

Preview with #7E31B8

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

Preview Lab → · Contrast checker → · Palette generator →

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