#9840BD#9840BD

#9840BD is a mid, vivid purple. Relative luminance 0.140; OKLCH L 54.4% C 0.196 H 314.3°. Best body text is #FFFFFF at 5.52:1 contrast (WCAG AA passes).

Color values

HEX#9840BD
RGBrgb(152, 64, 189)
HSLhsl(282, 49%, 50%)
HSVhsv(282, 66%, 74%)
CMYKcmyk(19.6%, 66.1%, 0%, 25.9%)
CIE-LABlab(44.26, 56.15, -49.97)
CIE-LCHlch(44.26, 75.17, 318.33°)
OKLaboklab(54.39% 0.137 -0.1406)
OKLCHoklch(54.39% 0.196 314.3)
XYZxyz(23.9661, 14.0171, 49.5774)
Luminance0.1402 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840BD #65BD40
analogous
#5A40BD #9840BD #BD40A4
triadic
#9840BD #BD9840 #40BD98
tetradic
#9840BD #BD5A40 #65BD40 #40A4BD
square
#9840BD #BD5A40 #65BD40 #40A4BD
split-complementary
#9840BD #A4BD40 #40BD5A
monochromatic
#4E2162 #73318F #9840BD #B16DCD #C99ADD

Accessibility & contrast

On white

5.52
#9840BD on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.80
#9840BD on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840BD
5.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840BD#FFFFFF#000000##FFFFFF
##9840BD1.005.523.805.52
#FFFFFF5.521.0021.001.00
#0000003.8021.001.0021.00
##FFFFFF5.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064C1
Deuteranopia (green-blind)
#3B6BBA
Tritanopia (blue-blind)
#955879
Achromatopsia (no color)
#696969

Design tokens & code

CSS
--color: #9840bd;
/* rgb */ color: rgb(152, 64, 189);
/* oklch */ color: oklch(54.4% 0.196 314.3);
Tailwind
colors: {
  custom: {
    50: '#ba7bd1',
    500: '#9840bd',
    950: '#000000',
  },
}
SCSS
$custom: #9840bd;
$custom-light: #ba7bd1;
$custom-dark: #000000;
JSON
{
  "hex": "#9840bd",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 189
  },
  "hsl": {
    "h": 282.24,
    "s": 49.407,
    "l": 49.608
  },
  "oklch": {
    "l": 0.5439,
    "c": 0.19627,
    "h": 314.3
  },
  "luminance": 0.14016
}

Semantic roles & 50–950 ramp

primary
#9840BD
secondary
#A1C990
accent
#D94F78
background
#FBF7FC
surface
#F7EEF9
border
#D0C9D2
text
#120A14
muted
#817C82

Preview Lab

Preview with #9840BD

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

Preview Lab → · Contrast checker → · Palette generator →

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