#9840C3#9840C3

#9840C3 is a mid, highly saturated purple. Relative luminance 0.143; OKLCH L 54.8% C 0.202 H 312.5°. Best body text is #FFFFFF at 5.45:1 contrast (WCAG AA passes).

Color values

HEX#9840C3
RGBrgb(152, 64, 195)
HSLhsl(280, 52%, 51%)
HSVhsv(280, 67%, 76%)
CMYKcmyk(22.1%, 67.2%, 0%, 23.5%)
CIE-LABlab(44.64, 57.41, -52.86)
CIE-LCHlch(44.64, 78.04, 317.36°)
OKLaboklab(54.78% 0.1366 -0.149)
OKLCHoklch(54.78% 0.202 312.5)
XYZxyz(24.6309, 14.2830, 53.0786)
Luminance0.1428 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C3 #6BC340
analogous
#5640C3 #9840C3 #C340AD
triadic
#9840C3 #C39840 #40C398
tetradic
#9840C3 #C35640 #6BC340 #40ADC3
square
#9840C3 #C35640 #6BC340 #40ADC3
split-complementary
#9840C3 #ADC340 #40C356
monochromatic
#512168 #752F97 #9840C3 #B16FD2 #CA9DE0

Accessibility & contrast

On white

5.45
#9840C3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.86
#9840C3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C3
5.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C3#FFFFFF#000000##FFFFFF
##9840C31.005.453.865.45
#FFFFFF5.451.0021.001.00
#0000003.8621.001.0021.00
##FFFFFF5.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065C7
Deuteranopia (green-blind)
#356BC0
Tritanopia (blue-blind)
#935B7C
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #9840c3;
/* rgb */ color: rgb(152, 64, 195);
/* oklch */ color: oklch(54.8% 0.202 312.5);
Tailwind
colors: {
  custom: {
    50: '#ba7bd6',
    500: '#9840c3',
    950: '#000000',
  },
}
SCSS
$custom: #9840c3;
$custom-light: #ba7bd6;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c3",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 195
  },
  "hsl": {
    "h": 280.305,
    "s": 52.191,
    "l": 50.784
  },
  "oklch": {
    "l": 0.54783,
    "c": 0.20216,
    "h": 312.5
  },
  "luminance": 0.14282
}

Semantic roles & 50–950 ramp

primary
#9840C3
secondary
#A5CC92
accent
#DC4C7B
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A14
muted
#817C83

Preview Lab

Preview with #9840C3

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

Preview Lab → · Contrast checker → · Palette generator →

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