#8A40B7#8A40B7

#8A40B7 is a mid, vivid violet. Relative luminance 0.125; OKLCH L 52.2% C 0.185 H 310.1°. Best body text is #FFFFFF at 6.00:1 contrast (WCAG AA passes).

Color values

HEX#8A40B7
RGBrgb(138, 64, 183)
HSLhsl(277, 48%, 48%)
HSVhsv(277, 65%, 72%)
CMYKcmyk(24.6%, 65%, 0%, 28.2%)
CIE-LABlab(41.98, 51.67, -50.21)
CIE-LCHlch(41.98, 72.05, 315.82°)
OKLaboklab(52.23% 0.1194 -0.1417)
OKLCHoklch(52.23% 0.185 310.1)
XYZxyz(20.8602, 12.4894, 46.1024)
Luminance0.1249 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40B7 #6DB740
analogous
#4E40B7 #8A40B7 #B740A8
triadic
#8A40B7 #B78A40 #40B78A
tetradic
#8A40B7 #B74E40 #6DB740 #40A8B7
square
#8A40B7 #B74E40 #6DB740 #40A8B7
split-complementary
#8A40B7 #A8B740 #40B74E
monochromatic
#46205C #68308A #8A40B7 #A669CB #C197DB

Accessibility & contrast

On white

6.00
#8A40B7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.50
#8A40B7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40B7
6.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40B7#FFFFFF#000000##FFFFFF
##8A40B71.006.003.506.00
#FFFFFF6.001.0021.001.00
#0000003.5021.001.0021.00
##FFFFFF6.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060BB
Deuteranopia (green-blind)
#3064B4
Tritanopia (blue-blind)
#845876
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #8a40b7;
/* rgb */ color: rgb(138, 64, 183);
/* oklch */ color: oklch(52.2% 0.185 310.1);
Tailwind
colors: {
  custom: {
    50: '#b07acd',
    500: '#8a40b7',
    950: '#000000',
  },
}
SCSS
$custom: #8a40b7;
$custom-light: #b07acd;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40b7",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 277.311,
    "s": 48.178,
    "l": 48.431
  },
  "oklch": {
    "l": 0.52232,
    "c": 0.18527,
    "h": 310.1
  },
  "luminance": 0.12489
}

Semantic roles & 50–950 ramp

primary
#8A40B7
secondary
#A2C68D
accent
#D85083
background
#FBF7FC
surface
#F6EEF9
border
#D0C9D2
text
#110913
muted
#807B82

Preview Lab

Preview with #8A40B7

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

Preview Lab → · Contrast checker → · Palette generator →

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