#9840C4#9840C4

#9840C4 is a mid, highly saturated purple. Relative luminance 0.143; OKLCH L 54.9% C 0.203 H 312.2°. Best body text is #FFFFFF at 5.43:1 contrast (WCAG AA passes).

Color values

HEX#9840C4
RGBrgb(152, 64, 196)
HSLhsl(280, 53%, 51%)
HSVhsv(280, 67%, 77%)
CMYKcmyk(22.4%, 67.3%, 0%, 23.1%)
CIE-LABlab(44.70, 57.62, -53.34)
CIE-LCHlch(44.70, 78.52, 317.21°)
OKLaboklab(54.85% 0.1365 -0.1504)
OKLCHoklch(54.85% 0.203 312.2)
XYZxyz(24.7443, 14.3284, 53.6760)
Luminance0.1433 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840C4 #6CC440
analogous
#5640C4 #9840C4 #C440AE
triadic
#9840C4 #C49840 #40C498
tetradic
#9840C4 #C45640 #6CC440 #40AEC4
square
#9840C4 #C45640 #6CC440 #40AEC4
split-complementary
#9840C4 #AEC440 #40C456
monochromatic
#512069 #752F98 #9840C4 #B16FD2 #CA9EE1

Accessibility & contrast

On white

5.43
#9840C4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.87
#9840C4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840C4
5.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840C4#FFFFFF#000000##FFFFFF
##9840C41.005.433.875.43
#FFFFFF5.431.0021.001.00
#0000003.8721.001.0021.00
##FFFFFF5.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065C8
Deuteranopia (green-blind)
#336CC1
Tritanopia (blue-blind)
#935B7D
Achromatopsia (no color)
#6A6A6A

Design tokens & code

CSS
--color: #9840c4;
/* rgb */ color: rgb(152, 64, 196);
/* oklch */ color: oklch(54.9% 0.203 312.2);
Tailwind
colors: {
  custom: {
    50: '#ba7bd7',
    500: '#9840c4',
    950: '#000000',
  },
}
SCSS
$custom: #9840c4;
$custom-light: #ba7bd7;
$custom-dark: #000000;
JSON
{
  "hex": "#9840c4",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 196
  },
  "hsl": {
    "h": 280,
    "s": 52.8,
    "l": 50.98
  },
  "oklch": {
    "l": 0.5485,
    "c": 0.20314,
    "h": 312.2
  },
  "luminance": 0.14328
}

Semantic roles & 50–950 ramp

primary
#9840C4
secondary
#A6CD93
accent
#DC4C7C
background
#FBF7FD
surface
#F7EEFA
border
#D0C9D3
text
#120A14
muted
#817C83

Preview Lab

Preview with #9840C4

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

Preview Lab → · Contrast checker → · Palette generator →

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