#9840CD#9840CD

#9840CD is a mid, highly saturated violet. Relative luminance 0.147; OKLCH L 55.5% C 0.212 H 309.8°. Best body text is #FFFFFF at 5.32:1 contrast (WCAG AA passes).

Color values

HEX#9840CD
RGBrgb(152, 64, 205)
HSLhsl(277, 59%, 53%)
HSVhsv(277, 69%, 80%)
CMYKcmyk(25.9%, 68.8%, 0%, 19.6%)
CIE-LABlab(45.29, 59.56, -57.59)
CIE-LCHlch(45.29, 82.85, 315.96°)
OKLaboklab(55.46% 0.1357 -0.1629)
OKLCHoklch(55.46% 0.212 309.8)
XYZxyz(25.7996, 14.7505, 59.2338)
Luminance0.1475 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840CD #75CD40
analogous
#5240CD #9840CD #CD40BB
triadic
#9840CD #CD9840 #40CD98
tetradic
#9840CD #CD5240 #75CD40 #40BBCD
square
#9840CD #CD5240 #75CD40 #40BBCD
split-complementary
#9840CD #BBCD40 #40CD52
monochromatic
#541E74 #772BA5 #9840CD #B271DA #CCA1E6

Accessibility & contrast

On white

5.32
#9840CD on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.95
#9840CD on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840CD
5.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840CD#FFFFFF#000000##FFFFFF
##9840CD1.005.323.955.32
#FFFFFF5.321.0021.001.00
#0000003.9521.001.0021.00
##FFFFFF5.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067D1
Deuteranopia (green-blind)
#276CCA
Tritanopia (blue-blind)
#915F82
Achromatopsia (no color)
#6B6B6B

Design tokens & code

CSS
--color: #9840cd;
/* rgb */ color: rgb(152, 64, 205);
/* oklch */ color: oklch(55.5% 0.212 309.8);
Tailwind
colors: {
  custom: {
    50: '#bb7cdd',
    500: '#9840cd',
    950: '#000000',
  },
}
SCSS
$custom: #9840cd;
$custom-light: #bb7cdd;
$custom-dark: #000000;
JSON
{
  "hex": "#9840cd",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 205
  },
  "hsl": {
    "h": 277.447,
    "s": 58.506,
    "l": 52.745
  },
  "oklch": {
    "l": 0.5546,
    "c": 0.21201,
    "h": 309.8
  },
  "luminance": 0.1475
}

Semantic roles & 50–950 ramp

primary
#9840CD
secondary
#ADD396
accent
#E24681
background
#FBF7FD
surface
#F7EEFB
border
#D0C9D4
text
#120A15
muted
#817C83

Preview Lab

Preview with #9840CD

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

Preview Lab → · Contrast checker → · Palette generator →

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