#8A40B8#8A40B8

#8A40B8 is a mid, vivid violet. Relative luminance 0.125; OKLCH L 52.3% C 0.186 H 309.8°. Best body text is #FFFFFF at 5.99:1 contrast (WCAG AA passes).

Color values

HEX#8A40B8
RGBrgb(138, 64, 184)
HSLhsl(277, 48%, 49%)
HSVhsv(277, 65%, 72%)
CMYKcmyk(25%, 65.2%, 0%, 27.8%)
CIE-LABlab(42.05, 51.89, -50.69)
CIE-LCHlch(42.05, 72.55, 315.67°)
OKLaboklab(52.3% 0.1193 -0.1431)
OKLCHoklch(52.3% 0.186 309.8)
XYZxyz(20.9647, 12.5312, 46.6525)
Luminance0.1253 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40B8 #6EB840
analogous
#4E40B8 #8A40B8 #B840AA
triadic
#8A40B8 #B88A40 #40B88A
tetradic
#8A40B8 #B84E40 #6EB840 #40AAB8
square
#8A40B8 #B84E40 #6EB840 #40AAB8
split-complementary
#8A40B8 #AAB840 #40B84E
monochromatic
#46205D #68308B #8A40B8 #A66ACB #C197DB

Accessibility & contrast

On white

5.99
#8A40B8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.51
#8A40B8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40B8
5.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40B8#FFFFFF#000000##FFFFFF
##8A40B81.005.993.515.99
#FFFFFF5.991.0021.001.00
#0000003.5121.001.0021.00
##FFFFFF5.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060BC
Deuteranopia (green-blind)
#2F64B5
Tritanopia (blue-blind)
#845876
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #8a40b8;
/* rgb */ color: rgb(138, 64, 184);
/* oklch */ color: oklch(52.3% 0.186 309.8);
Tailwind
colors: {
  custom: {
    50: '#b07ace',
    500: '#8a40b8',
    950: '#000000',
  },
}
SCSS
$custom: #8a40b8;
$custom-light: #b07ace;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40b8",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 184
  },
  "hsl": {
    "h": 277,
    "s": 48.387,
    "l": 48.627
  },
  "oklch": {
    "l": 0.52299,
    "c": 0.18632,
    "h": 309.8
  },
  "luminance": 0.12531
}

Semantic roles & 50–950 ramp

primary
#8A40B8
secondary
#A3C78D
accent
#D85084
background
#FBF7FC
surface
#F6EEF9
border
#D0C9D2
text
#110914
muted
#807B82

Preview Lab

Preview with #8A40B8

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

Preview Lab → · Contrast checker → · Palette generator →

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