#9840BB#9840BB

#9840BB is a mid, vivid purple. Relative luminance 0.139; OKLCH L 54.3% C 0.194 H 314.9°. Best body text is #FFFFFF at 5.55:1 contrast (WCAG AA passes).

Color values

HEX#9840BB
RGBrgb(152, 64, 187)
HSLhsl(283, 49%, 49%)
HSVhsv(283, 66%, 73%)
CMYKcmyk(18.7%, 65.8%, 0%, 26.7%)
CIE-LABlab(44.13, 55.73, -49.00)
CIE-LCHlch(44.13, 74.21, 318.68°)
OKLaboklab(54.26% 0.1371 -0.1377)
OKLCHoklch(54.26% 0.194 314.9)
XYZxyz(23.7505, 13.9308, 48.4419)
Luminance0.1393 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840BB #63BB40
analogous
#5B40BB #9840BB #BB40A1
triadic
#9840BB #BB9840 #40BB98
tetradic
#9840BB #BB5B40 #63BB40 #40A1BB
square
#9840BB #BB5B40 #63BB40 #40A1BB
split-complementary
#9840BB #A1BB40 #40BB5B
monochromatic
#4E2160 #73308D #9840BB #B16CCD #C999DC

Accessibility & contrast

On white

5.55
#9840BB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.79
#9840BB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840BB
5.55:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840BB#FFFFFF#000000##FFFFFF
##9840BB1.005.553.795.55
#FFFFFF5.551.0021.001.00
#0000003.7921.001.0021.00
##FFFFFF5.551.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063BF
Deuteranopia (green-blind)
#3D6BB8
Tritanopia (blue-blind)
#955878
Achromatopsia (no color)
#686868

Design tokens & code

CSS
--color: #9840bb;
/* rgb */ color: rgb(152, 64, 187);
/* oklch */ color: oklch(54.3% 0.194 314.9);
Tailwind
colors: {
  custom: {
    50: '#ba7bd0',
    500: '#9840bb',
    950: '#000000',
  },
}
SCSS
$custom: #9840bb;
$custom-light: #ba7bd0;
$custom-dark: #000000;
JSON
{
  "hex": "#9840bb",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 187
  },
  "hsl": {
    "h": 282.927,
    "s": 49.004,
    "l": 49.216
  },
  "oklch": {
    "l": 0.54262,
    "c": 0.19431,
    "h": 314.9
  },
  "luminance": 0.1393
}

Semantic roles & 50–950 ramp

primary
#9840BB
secondary
#9FC88F
accent
#D94F76
background
#FBF7FC
surface
#F7EEF9
border
#D0C9D2
text
#120A14
muted
#817C82

Preview Lab

Preview with #9840BB

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

Preview Lab → · Contrast checker → · Palette generator →

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