#9840CA#9840CA

#9840CA is a mid, highly saturated violet. Relative luminance 0.146; OKLCH L 55.3% C 0.209 H 310.6°. Best body text is #FFFFFF at 5.36:1 contrast (WCAG AA passes).

Color values

HEX#9840CA
RGBrgb(152, 64, 202)
HSLhsl(278, 57%, 52%)
HSVhsv(278, 68%, 79%)
CMYKcmyk(24.8%, 68.3%, 0%, 20.8%)
CIE-LABlab(45.09, 58.91, -56.18)
CIE-LCHlch(45.09, 81.40, 316.36°)
OKLaboklab(55.26% 0.136 -0.1588)
OKLCHoklch(55.26% 0.209 310.6)
XYZxyz(25.4409, 14.6070, 57.3449)
Luminance0.1461 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840CA #72CA40
analogous
#5340CA #9840CA #CA40B7
triadic
#9840CA #CA9840 #40CA98
tetradic
#9840CA #CA5340 #72CA40 #40B7CA
square
#9840CA #CA5340 #72CA40 #40B7CA
split-complementary
#9840CA #B7CA40 #40CA53
monochromatic
#531F70 #762CA0 #9840CA #B270D7 #CCA0E5

Accessibility & contrast

On white

5.36
#9840CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.92
#9840CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840CA
5.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840CA#FFFFFF#000000##FFFFFF
##9840CA1.005.363.925.36
#FFFFFF5.361.0021.001.00
#0000003.9221.001.0021.00
##FFFFFF5.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067CE
Deuteranopia (green-blind)
#2C6CC7
Tritanopia (blue-blind)
#915D80
Achromatopsia (no color)
#6B6B6B

Design tokens & code

CSS
--color: #9840ca;
/* rgb */ color: rgb(152, 64, 202);
/* oklch */ color: oklch(55.3% 0.209 310.6);
Tailwind
colors: {
  custom: {
    50: '#bb7bdb',
    500: '#9840ca',
    950: '#000000',
  },
}
SCSS
$custom: #9840ca;
$custom-light: #bb7bdb;
$custom-dark: #000000;
JSON
{
  "hex": "#9840ca",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 278.261,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.55255,
    "c": 0.20905,
    "h": 310.6
  },
  "luminance": 0.14606
}

Semantic roles & 50–950 ramp

primary
#9840CA
secondary
#ABD195
accent
#E0487F
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840CA

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

Preview Lab → · Contrast checker → · Palette generator →

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