#9840BA#9840BA

#9840BA is a mid, vivid purple. Relative luminance 0.139; OKLCH L 54.2% C 0.193 H 315.2°. Best body text is #FFFFFF at 5.56:1 contrast (WCAG AA passes).

Color values

HEX#9840BA
RGBrgb(152, 64, 186)
HSLhsl(283, 49%, 49%)
HSVhsv(283, 66%, 73%)
CMYKcmyk(18.3%, 65.6%, 0%, 27.1%)
CIE-LABlab(44.07, 55.53, -48.52)
CIE-LCHlch(44.07, 73.74, 318.86°)
OKLaboklab(54.2% 0.1371 -0.1363)
OKLCHoklch(54.2% 0.193 315.2)
XYZxyz(23.6438, 13.8882, 47.8801)
Luminance0.1389 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840BA #62BA40
analogous
#5B40BA #9840BA #BA409F
triadic
#9840BA #BA9840 #40BA98
tetradic
#9840BA #BA5B40 #62BA40 #409FBA
square
#9840BA #BA5B40 #62BA40 #409FBA
split-complementary
#9840BA #9FBA40 #40BA5B
monochromatic
#4E215F #73308C #9840BA #B16BCC #C999DC

Accessibility & contrast

On white

5.56
#9840BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.78
#9840BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840BA
5.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840BA#FFFFFF#000000##FFFFFF
##9840BA1.005.563.785.56
#FFFFFF5.561.0021.001.00
#0000003.7821.001.0021.00
##FFFFFF5.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0463BE
Deuteranopia (green-blind)
#3E6BB7
Tritanopia (blue-blind)
#955778
Achromatopsia (no color)
#686868

Design tokens & code

CSS
--color: #9840ba;
/* rgb */ color: rgb(152, 64, 186);
/* oklch */ color: oklch(54.2% 0.193 315.2);
Tailwind
colors: {
  custom: {
    50: '#ba7bcf',
    500: '#9840ba',
    950: '#000000',
  },
}
SCSS
$custom: #9840ba;
$custom-light: #ba7bcf;
$custom-dark: #000000;
JSON
{
  "hex": "#9840ba",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 283.279,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.54198,
    "c": 0.19333,
    "h": 315.2
  },
  "luminance": 0.13887
}

Semantic roles & 50–950 ramp

primary
#9840BA
secondary
#9EC88E
accent
#D84F76
background
#FBF7FC
surface
#F7EEF9
border
#D0C9D2
text
#120A14
muted
#817C82

Preview Lab

Preview with #9840BA

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

Preview Lab → · Contrast checker → · Palette generator →

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