#8A31B2#8A31B2

#8A31B2 is a mid, vivid purple. Relative luminance 0.108; OKLCH L 50.2% C 0.200 H 313.0°. Best body text is #FFFFFF at 6.64:1 contrast (WCAG AA passes).

Color values

HEX#8A31B2
RGBrgb(138, 49, 178)
HSLhsl(281, 57%, 45%)
HSVhsv(281, 72%, 70%)
CMYKcmyk(22.5%, 72.5%, 0%, 30.2%)
CIE-LABlab(39.27, 57.25, -51.63)
CIE-LCHlch(39.27, 77.10, 317.95°)
OKLaboklab(50.18% 0.1362 -0.1458)
OKLCHoklch(50.18% 0.2 313)
XYZxyz(19.6140, 10.8148, 43.1651)
Luminance0.1081 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A31B2 #59B231
analogous
#4931B2 #8A31B2 #B2319A
triadic
#8A31B2 #B28A31 #31B28A
tetradic
#8A31B2 #B24931 #59B231 #319AB2
square
#8A31B2 #B24931 #59B231 #319AB2
split-complementary
#8A31B2 #9AB231 #31B249
monochromatic
#401752 #652482 #8A31B2 #A851CF #C081DC

Accessibility & contrast

On white

6.64
#8A31B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.16
#8A31B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A31B2
6.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A31B2#FFFFFF#000000##FFFFFF
##8A31B21.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)
#0058B6
Deuteranopia (green-blind)
#255EAF
Tritanopia (blue-blind)
#864D6F
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #8a31b2;
/* rgb */ color: rgb(138, 49, 178);
/* oklch */ color: oklch(50.2% 0.200 313.0);
Tailwind
colors: {
  custom: {
    50: '#b071ca',
    500: '#8a31b2',
    950: '#000000',
  },
}
SCSS
$custom: #8a31b2;
$custom-light: #b071ca;
$custom-dark: #000000;
JSON
{
  "hex": "#8a31b2",
  "rgb": {
    "r": 138,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 281.395,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.50181,
    "c": 0.19951,
    "h": 313
  },
  "luminance": 0.10814
}

Semantic roles & 50–950 ramp

primary
#8A31B2
secondary
#91C579
accent
#E04877
background
#FBF7FC
surface
#F6EDF8
border
#D0C8D1
text
#110813
muted
#807B82

Preview Lab

Preview with #8A31B2

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

Preview Lab → · Contrast checker → · Palette generator →

#8A31B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva