#9840C2#9840C2

#9840C2 is a mid, highly saturated purple. Relative luminance 0.142; OKLCH L 54.7% C 0.201 H 312.8°. Best body text is #FFFFFF at 5.46:1 contrast (WCAG AA passes).

Color values

HEX#9840C2
RGBrgb(152, 64, 194)
HSLhsl(281, 52%, 51%)
HSVhsv(281, 67%, 76%)
CMYKcmyk(21.6%, 67%, 0%, 23.9%)
CIE-LABlab(44.57, 57.20, -52.38)
CIE-LCHlch(44.57, 77.56, 317.52°)
OKLaboklab(54.72% 0.1367 -0.1476)
OKLCHoklch(54.72% 0.201 312.8)
XYZxyz(24.5182, 14.2379, 52.4851)
Luminance0.1424 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C2 #6AC240
analogous
#5740C2 #9840C2 #C240AB
triadic
#9840C2 #C29840 #40C298
tetradic
#9840C2 #C25740 #6AC240 #40ABC2
square
#9840C2 #C25740 #6AC240 #40ABC2
split-complementary
#9840C2 #ABC240 #40C257
monochromatic
#502167 #743095 #9840C2 #B16ED1 #CA9DE0

Accessibility & contrast

On white

5.46
#9840C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.85
#9840C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C2
5.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C2#FFFFFF#000000##FFFFFF
##9840C21.005.463.855.46
#FFFFFF5.461.0021.001.00
#0000003.8521.001.0021.00
##FFFFFF5.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065C6
Deuteranopia (green-blind)
#366BBF
Tritanopia (blue-blind)
#935A7C
Achromatopsia (no color)
#696969

Design tokens & code

CSS
--color: #9840c2;
/* rgb */ color: rgb(152, 64, 194);
/* oklch */ color: oklch(54.7% 0.201 312.8);
Tailwind
colors: {
  custom: {
    50: '#ba7bd5',
    500: '#9840c2',
    950: '#000000',
  },
}
SCSS
$custom: #9840c2;
$custom-light: #ba7bd5;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c2",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 280.615,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.54717,
    "c": 0.20117,
    "h": 312.8
  },
  "luminance": 0.14237
}

Semantic roles & 50–950 ramp

primary
#9840C2
secondary
#A5CC92
accent
#DB4D7B
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A14
muted
#817C83

Preview Lab

Preview with #9840C2

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

Preview Lab → · Contrast checker → · Palette generator →

#9840C2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva