#8A51B2#8A51B2

#8A51B2 is a mid, vivid violet. Relative luminance 0.145; OKLCH L 54.3% C 0.154 H 309.3°. Best body text is #FFFFFF at 5.38:1 contrast (WCAG AA passes).

Color values

HEX#8A51B2
RGBrgb(138, 81, 178)
HSLhsl(275, 39%, 51%)
HSVhsv(275, 54%, 70%)
CMYKcmyk(22.5%, 54.5%, 0%, 30.2%)
CIE-LABlab(44.95, 41.76, -42.54)
CIE-LCHlch(44.95, 59.61, 314.47°)
OKLaboklab(54.29% 0.0977 -0.1193)
OKLCHoklch(54.29% 0.154 309.3)
XYZxyz(21.4580, 14.5028, 43.7798)
Luminance0.1450 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A51B2 #79B251
analogous
#5951B2 #8A51B2 #B251A9
triadic
#8A51B2 #B28A51 #51B28A
tetradic
#8A51B2 #B25951 #79B251 #51A9B2
square
#8A51B2 #B25951 #79B251 #51A9B2
split-complementary
#8A51B2 #A9B251 #51B259
monochromatic
#492A5F #6A3D89 #8A51B2 #A77BC5 #C3A6D8

Accessibility & contrast

On white

5.38
#8A51B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.90
#8A51B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A51B2
5.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A51B2#FFFFFF#000000##FFFFFF
##8A51B21.005.383.905.38
#FFFFFF5.381.0021.001.00
#0000003.9021.001.0021.00
##FFFFFF5.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3468B5
Deuteranopia (green-blind)
#476BB0
Tritanopia (blue-blind)
#85627A
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #8a51b2;
/* rgb */ color: rgb(138, 81, 178);
/* oklch */ color: oklch(54.3% 0.154 309.3);
Tailwind
colors: {
  custom: {
    50: '#af84c9',
    500: '#8a51b2',
    950: '#000000',
  },
}
SCSS
$custom: #8a51b2;
$custom-light: #af84c9;
$custom-dark: #000000;
JSON
{
  "hex": "#8a51b2",
  "rgb": {
    "r": 138,
    "g": 81,
    "b": 178
  },
  "hsl": {
    "h": 275.258,
    "s": 38.645,
    "l": 50.784
  },
  "oklch": {
    "l": 0.54294,
    "c": 0.15422,
    "h": 309.3
  },
  "luminance": 0.14502
}

Semantic roles & 50–950 ramp

primary
#8A51B2
secondary
#ACC59A
accent
#CF598A
background
#FBF8FC
surface
#F6EFF8
border
#D0CAD1
text
#110B13
muted
#807C82

Preview Lab

Preview with #8A51B2

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

Preview Lab → · Contrast checker → · Palette generator →

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