#8A40D2#8A40D2

#8A40D2 is a mid, highly saturated violet. Relative luminance 0.137; OKLCH L 54.1% C 0.214 H 303.0°. Best body text is #FFFFFF at 5.61:1 contrast (WCAG AA passes).

Color values

HEX#8A40D2
RGBrgb(138, 64, 210)
HSLhsl(270, 62%, 54%)
HSVhsv(270, 70%, 82%)
CMYKcmyk(34.3%, 69.5%, 0%, 17.6%)
CIE-LABlab(43.83, 57.88, -62.92)
CIE-LCHlch(43.83, 85.50, 312.61°)
OKLaboklab(54.14% 0.1164 -0.179)
OKLCHoklch(54.14% 0.214 303)
XYZxyz(23.9448, 13.7232, 62.3476)
Luminance0.1372 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40D2 #88D240
analogous
#4140D2 #8A40D2 #D240D1
triadic
#8A40D2 #D28A40 #40D28A
tetradic
#8A40D2 #D24140 #88D240 #40D1D2
square
#8A40D2 #D24140 #88D240 #40D1D2
split-complementary
#8A40D2 #D1D240 #40D241
monochromatic
#4C1D7B #6B29AC #8A40D2 #A872DE #C7A3E9

Accessibility & contrast

On white

5.61
#8A40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.74
#8A40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40D2
5.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40D2#FFFFFF#000000##FFFFFF
##8A40D21.005.613.745.61
#FFFFFF5.611.0021.001.00
#0000003.7421.001.0021.00
##FFFFFF5.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066D6
Deuteranopia (green-blind)
#0067CF
Tritanopia (blue-blind)
#7C6284
Achromatopsia (no color)
#686868

Design tokens & code

CSS
--color: #8a40d2;
/* rgb */ color: rgb(138, 64, 210);
/* oklch */ color: oklch(54.1% 0.214 303.0);
Tailwind
colors: {
  custom: {
    50: '#b27be1',
    500: '#8a40d2',
    950: '#000000',
  },
}
SCSS
$custom: #8a40d2;
$custom-light: #b27be1;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40d2",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 270.411,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.54144,
    "c": 0.21358,
    "h": 303
  },
  "luminance": 0.13723
}

Semantic roles & 50–950 ramp

primary
#8A40D2
secondary
#B6D698
accent
#E54393
background
#FBF7FD
surface
#F6EEFB
border
#D0C9D4
text
#110A15
muted
#807C83

Preview Lab

Preview with #8A40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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