#9840B7#9840B7

#9840B7 is a mid, vivid purple. Relative luminance 0.138; OKLCH L 54.0% C 0.190 H 316.1°. Best body text is #FFFFFF at 5.60:1 contrast (WCAG AA passes).

Color values

HEX#9840B7
RGBrgb(152, 64, 183)
HSLhsl(284, 48%, 48%)
HSVhsv(284, 65%, 72%)
CMYKcmyk(16.9%, 65%, 0%, 28.2%)
CIE-LABlab(43.89, 54.91, -47.05)
CIE-LCHlch(43.89, 72.31, 319.41°)
OKLaboklab(54.01% 0.1372 -0.132)
OKLCHoklch(54.01% 0.19 316.1)
XYZxyz(23.3282, 13.7619, 46.2180)
Luminance0.1376 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B7 #5FB740
analogous
#5C40B7 #9840B7 #B7409A
triadic
#9840B7 #B79840 #40B798
tetradic
#9840B7 #B75C40 #5FB740 #409AB7
square
#9840B7 #B75C40 #5FB740 #409AB7
split-complementary
#9840B7 #9AB740 #40B75C
monochromatic
#4D205C #72308A #9840B7 #B169CB #C997DB

Accessibility & contrast

On white

5.60
#9840B7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.75
#9840B7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840B7
5.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B7#FFFFFF#000000##FFFFFF
##9840B71.005.603.755.60
#FFFFFF5.601.0021.001.00
#0000003.7521.001.0021.00
##FFFFFF5.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0F62BB
Deuteranopia (green-blind)
#406AB4
Tritanopia (blue-blind)
#965676
Achromatopsia (no color)
#686868

Design tokens & code

CSS
--color: #9840b7;
/* rgb */ color: rgb(152, 64, 183);
/* oklch */ color: oklch(54.0% 0.190 316.1);
Tailwind
colors: {
  custom: {
    50: '#ba7bcd',
    500: '#9840b7',
    950: '#000000',
  },
}
SCSS
$custom: #9840b7;
$custom-light: #ba7bcd;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b7",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 284.37,
    "s": 48.178,
    "l": 48.431
  },
  "oklch": {
    "l": 0.54007,
    "c": 0.1904,
    "h": 316.1
  },
  "luminance": 0.13761
}

Semantic roles & 50–950 ramp

primary
#9840B7
secondary
#9CC68D
accent
#D85073
background
#FBF7FC
surface
#F7EEF9
border
#D0C9D2
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B7

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

Preview Lab → · Contrast checker → · Palette generator →

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