#8A40B5#8A40B5

#8A40B5 is a mid, vivid violet. Relative luminance 0.124; OKLCH L 52.1% C 0.183 H 310.7°. Best body text is #FFFFFF at 6.03:1 contrast (WCAG AA passes).

Color values

HEX#8A40B5
RGBrgb(138, 64, 181)
HSLhsl(278, 48%, 48%)
HSVhsv(278, 65%, 71%)
CMYKcmyk(23.8%, 64.6%, 0%, 29%)
CIE-LABlab(41.86, 51.22, -49.24)
CIE-LCHlch(41.86, 71.05, 316.13°)
OKLaboklab(52.1% 0.1195 -0.1389)
OKLCHoklch(52.1% 0.183 310.7)
XYZxyz(20.6535, 12.4067, 45.0138)
Luminance0.1241 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40B5 #6BB540
analogous
#5040B5 #8A40B5 #B540A5
triadic
#8A40B5 #B58A40 #40B58A
tetradic
#8A40B5 #B55040 #6BB540 #40A5B5
square
#8A40B5 #B55040 #6BB540 #40A5B5
split-complementary
#8A40B5 #A5B540 #40B550
monochromatic
#45205B #683088 #8A40B5 #A668CA #C196DA

Accessibility & contrast

On white

6.03
#8A40B5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.48
#8A40B5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40B5
6.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40B5#FFFFFF#000000##FFFFFF
##8A40B51.006.033.486.03
#FFFFFF6.031.0021.001.00
#0000003.4821.001.0021.00
##FFFFFF6.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FB9
Deuteranopia (green-blind)
#3264B2
Tritanopia (blue-blind)
#845775
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #8a40b5;
/* rgb */ color: rgb(138, 64, 181);
/* oklch */ color: oklch(52.1% 0.183 310.7);
Tailwind
colors: {
  custom: {
    50: '#b07acc',
    500: '#8a40b5',
    950: '#000000',
  },
}
SCSS
$custom: #8a40b5;
$custom-light: #b07acc;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40b5",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 181
  },
  "hsl": {
    "h": 277.949,
    "s": 47.755,
    "l": 48.039
  },
  "oklch": {
    "l": 0.52098,
    "c": 0.18317,
    "h": 310.7
  },
  "luminance": 0.12406
}

Semantic roles & 50–950 ramp

primary
#8A40B5
secondary
#A1C58B
accent
#D75082
background
#FBF7FC
surface
#F6EEF9
border
#D0C9D2
text
#110913
muted
#807B82

Preview Lab

Preview with #8A40B5

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

Preview Lab → · Contrast checker → · Palette generator →

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