#8A40B3#8A40B3

#8A40B3 is a mid, vivid violet. Relative luminance 0.123; OKLCH L 52.0% C 0.181 H 311.3°. Best body text is #FFFFFF at 6.06:1 contrast (WCAG AA passes).

Color values

HEX#8A40B3
RGBrgb(138, 64, 179)
HSLhsl(279, 47%, 48%)
HSVhsv(279, 64%, 70%)
CMYKcmyk(22.9%, 64.2%, 0%, 29.8%)
CIE-LABlab(41.73, 50.78, -48.27)
CIE-LCHlch(41.73, 70.06, 316.45°)
OKLaboklab(51.97% 0.1196 -0.136)
OKLCHoklch(51.97% 0.181 311.3)
XYZxyz(20.4498, 12.3252, 43.9408)
Luminance0.1232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40B3 #69B340
analogous
#5140B3 #8A40B3 #B340A2
triadic
#8A40B3 #B38A40 #40B38A
tetradic
#8A40B3 #B35140 #69B340 #40A2B3
square
#8A40B3 #B35140 #69B340 #40A2B3
split-complementary
#8A40B3 #A2B340 #40B351
monochromatic
#442059 #673086 #8A40B3 #A667C9 #C194D9

Accessibility & contrast

On white

6.06
#8A40B3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.47
#8A40B3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40B3
6.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40B3#FFFFFF#000000##FFFFFF
##8A40B31.006.063.476.06
#FFFFFF6.061.0021.001.00
#0000003.4721.001.0021.00
##FFFFFF6.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#015FB7
Deuteranopia (green-blind)
#3464B0
Tritanopia (blue-blind)
#855774
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #8a40b3;
/* rgb */ color: rgb(138, 64, 179);
/* oklch */ color: oklch(52.0% 0.181 311.3);
Tailwind
colors: {
  custom: {
    50: '#b07aca',
    500: '#8a40b3',
    950: '#000000',
  },
}
SCSS
$custom: #8a40b3;
$custom-light: #b07aca;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40b3",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 179
  },
  "hsl": {
    "h": 278.609,
    "s": 47.325,
    "l": 47.647
  },
  "oklch": {
    "l": 0.51966,
    "c": 0.18109,
    "h": 311.3
  },
  "luminance": 0.12325
}

Semantic roles & 50–950 ramp

primary
#8A40B3
secondary
#9FC48A
accent
#D75181
background
#FBF7FC
surface
#F6EEF8
border
#D0C9D1
text
#110913
muted
#807B82

Preview Lab

Preview with #8A40B3

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

Preview Lab → · Contrast checker → · Palette generator →

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