#9840B3#9840B3

#9840B3 is a mid, vivid purple. Relative luminance 0.136; OKLCH L 53.8% C 0.187 H 317.4°. Best body text is #FFFFFF at 5.65:1 contrast (WCAG AA passes).

Color values

HEX#9840B3
RGBrgb(152, 64, 179)
HSLhsl(286, 47%, 48%)
HSVhsv(286, 64%, 70%)
CMYKcmyk(15.1%, 64.2%, 0%, 29.8%)
CIE-LABlab(43.65, 54.09, -45.08)
CIE-LCHlch(43.65, 70.41, 320.19°)
OKLaboklab(53.76% 0.1373 -0.1262)
OKLCHoklch(53.76% 0.187 317.4)
XYZxyz(22.9178, 13.5978, 44.0565)
Luminance0.1360 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840B3 #5BB340
analogous
#5E40B3 #9840B3 #B34094
triadic
#9840B3 #B39840 #40B398
tetradic
#9840B3 #B35E40 #5BB340 #4094B3
square
#9840B3 #B35E40 #5BB340 #4094B3
split-complementary
#9840B3 #94B340 #40B35E
monochromatic
#4B2059 #723086 #9840B3 #B267C9 #C994D9

Accessibility & contrast

On white

5.65
#9840B3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.72
#9840B3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840B3
5.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840B3#FFFFFF#000000##FFFFFF
##9840B31.005.653.725.65
#FFFFFF5.651.0021.001.00
#0000003.7221.001.0021.00
##FFFFFF5.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1962B6
Deuteranopia (green-blind)
#436AB0
Tritanopia (blue-blind)
#975474
Achromatopsia (no color)
#676767

Design tokens & code

CSS
--color: #9840b3;
/* rgb */ color: rgb(152, 64, 179);
/* oklch */ color: oklch(53.8% 0.187 317.4);
Tailwind
colors: {
  custom: {
    50: '#b97bca',
    500: '#9840b3',
    950: '#000000',
  },
}
SCSS
$custom: #9840b3;
$custom-light: #b97bca;
$custom-dark: #000000;
JSON
{
  "hex": "#9840b3",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 179
  },
  "hsl": {
    "h": 285.913,
    "s": 47.325,
    "l": 47.647
  },
  "oklch": {
    "l": 0.53758,
    "c": 0.18651,
    "h": 317.4
  },
  "luminance": 0.13597
}

Semantic roles & 50–950 ramp

primary
#9840B3
secondary
#98C48A
accent
#D75170
background
#FBF7FC
surface
#F7EEF8
border
#D0C9D1
text
#120A13
muted
#817C82

Preview Lab

Preview with #9840B3

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

Preview Lab → · Contrast checker → · Palette generator →

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