#9840CF#9840CF

#9840CF is a mid, highly saturated violet. Relative luminance 0.148; OKLCH L 55.6% C 0.214 H 309.3°. Best body text is #FFFFFF at 5.29:1 contrast (WCAG AA passes).

Color values

HEX#9840CF
RGBrgb(152, 64, 207)
HSLhsl(277, 60%, 53%)
HSVhsv(277, 69%, 81%)
CMYKcmyk(26.6%, 69.1%, 0%, 18.8%)
CIE-LABlab(45.42, 59.99, -58.53)
CIE-LCHlch(45.42, 83.81, 315.71°)
OKLaboklab(55.6% 0.1354 -0.1657)
OKLCHoklch(55.6% 0.214 309.3)
XYZxyz(26.0425, 14.8477, 60.5134)
Luminance0.1485 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840CF #77CF40
analogous
#5040CF #9840CF #CF40BF
triadic
#9840CF #CF9840 #40CF98
tetradic
#9840CF #CF5040 #77CF40 #40BFCF
square
#9840CF #CF5040 #77CF40 #40BFCF
split-complementary
#9840CF #BFCF40 #40CF50
monochromatic
#551E77 #772AA8 #9840CF #B271DB #CDA2E8

Accessibility & contrast

On white

5.29
#9840CF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.97
#9840CF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840CF
5.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840CF#FFFFFF#000000##FFFFFF
##9840CF1.005.293.975.29
#FFFFFF5.291.0021.001.00
#0000003.9721.001.0021.00
##FFFFFF5.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0068D3
Deuteranopia (green-blind)
#236DCC
Tritanopia (blue-blind)
#905F83
Achromatopsia (no color)
#6B6B6B

Design tokens & code

CSS
--color: #9840cf;
/* rgb */ color: rgb(152, 64, 207);
/* oklch */ color: oklch(55.6% 0.214 309.3);
Tailwind
colors: {
  custom: {
    50: '#bb7cde',
    500: '#9840cf',
    950: '#000000',
  },
}
SCSS
$custom: #9840cf;
$custom-light: #bb7cde;
$custom-dark: #000000;
JSON
{
  "hex": "#9840cf",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 207
  },
  "hsl": {
    "h": 276.923,
    "s": 59.833,
    "l": 53.137
  },
  "oklch": {
    "l": 0.55599,
    "c": 0.21399,
    "h": 309.3
  },
  "luminance": 0.14847
}

Semantic roles & 50–950 ramp

primary
#9840CF
secondary
#AED497
accent
#E34582
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840CF

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

Preview Lab → · Contrast checker → · Palette generator →

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