#8A40C2#8A40C2

#8A40C2 is a mid, vivid violet. Relative luminance 0.130; OKLCH L 53.0% C 0.197 H 307.0°. Best body text is #FFFFFF at 5.84:1 contrast (WCAG AA passes).

Color values

HEX#8A40C2
RGBrgb(138, 64, 194)
HSLhsl(274, 52%, 51%)
HSVhsv(274, 67%, 76%)
CMYKcmyk(28.9%, 67%, 0%, 23.9%)
CIE-LABlab(42.71, 54.16, -55.47)
CIE-LCHlch(42.71, 77.53, 314.32°)
OKLaboklab(52.99% 0.1185 -0.1572)
OKLCHoklch(52.99% 0.197 307)
XYZxyz(22.0502, 12.9654, 52.3694)
Luminance0.1296 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#8A40C2 #78C240
analogous
#4940C2 #8A40C2 #C240B9
triadic
#8A40C2 #C28A40 #40C28A
tetradic
#8A40C2 #C24940 #78C240 #40B9C2
square
#8A40C2 #C24940 #78C240 #40B9C2
split-complementary
#8A40C2 #B9C240 #40C249
monochromatic
#492167 #693095 #8A40C2 #A66ED1 #C39DE0

Accessibility & contrast

On white

5.84
#8A40C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.59
#8A40C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #8A40C2
5.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##8A40C2#FFFFFF#000000##FFFFFF
##8A40C21.005.843.595.84
#FFFFFF5.841.0021.001.00
#0000003.5921.001.0021.00
##FFFFFF5.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062C6
Deuteranopia (green-blind)
#2065BF
Tritanopia (blue-blind)
#815C7C
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #8a40c2;
/* rgb */ color: rgb(138, 64, 194);
/* oklch */ color: oklch(53.0% 0.197 307.0);
Tailwind
colors: {
  custom: {
    50: '#b07ad5',
    500: '#8a40c2',
    950: '#000000',
  },
}
SCSS
$custom: #8a40c2;
$custom-light: #b07ad5;
$custom-dark: #000000;
JSON
{
  "hex": "#8a40c2",
  "rgb": {
    "r": 138,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 274.154,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.52987,
    "c": 0.19682,
    "h": 307
  },
  "luminance": 0.12965
}

Semantic roles & 50–950 ramp

primary
#8A40C2
secondary
#ABCC92
accent
#DB4D8A
background
#FBF7FD
surface
#F6EEFA
border
#D0C9D3
text
#110A14
muted
#807C83

Preview Lab

Preview with #8A40C2

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

Preview Lab → · Contrast checker → · Palette generator →

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