#9840DB#9840DB

#9840DB is a mid, highly saturated violet. Relative luminance 0.155; OKLCH L 56.5% C 0.226 H 306.3°. Best body text is #FFFFFF at 5.13:1 contrast (WCAG AA passes).

Color values

HEX#9840DB
RGBrgb(152, 64, 219)
HSLhsl(274, 68%, 55%)
HSVhsv(274, 71%, 86%)
CMYKcmyk(30.6%, 70.8%, 0%, 14.1%)
CIE-LABlab(46.25, 62.63, -64.07)
CIE-LCHlch(46.25, 89.59, 314.35°)
OKLaboklab(56.45% 0.1338 -0.1819)
OKLCHoklch(56.45% 0.226 306.3)
XYZxyz(27.5657, 15.4569, 68.5354)
Luminance0.1546 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840DB #83DB40
analogous
#4B40DB #9840DB #DB40D0
triadic
#9840DB #DB9840 #40DB98
tetradic
#9840DB #DB4B40 #83DB40 #40D0DB
square
#9840DB #DB4B40 #83DB40 #40D0DB
split-complementary
#9840DB #D0DB40 #40DB4B
monochromatic
#581987 #7923BB #9840DB #B473E5 #D0A7EE

Accessibility & contrast

On white

5.13
#9840DB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.09
#9840DB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840DB
5.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840DB#FFFFFF#000000##FFFFFF
##9840DB1.005.134.095.13
#FFFFFF5.131.0021.001.00
#0000004.0921.001.0021.00
##FFFFFF5.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006BDF
Deuteranopia (green-blind)
#006ED8
Tritanopia (blue-blind)
#8C648A
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #9840db;
/* rgb */ color: rgb(152, 64, 219);
/* oklch */ color: oklch(56.5% 0.226 306.3);
Tailwind
colors: {
  custom: {
    50: '#bc7ce7',
    500: '#9840db',
    950: '#000000',
  },
}
SCSS
$custom: #9840db;
$custom-light: #bc7ce7;
$custom-dark: #000000;
JSON
{
  "hex": "#9840db",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 219
  },
  "hsl": {
    "h": 274.065,
    "s": 68.282,
    "l": 55.49
  },
  "oklch": {
    "l": 0.56451,
    "c": 0.22584,
    "h": 306.3
  },
  "luminance": 0.15457
}

Semantic roles & 50–950 ramp

primary
#9840DB
secondary
#B7DC9B
accent
#EB3D88
background
#FCF7FE
surface
#F8EEFD
border
#D1C9D5
text
#120A16
muted
#817C84

Preview Lab

Preview with #9840DB

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

Preview Lab → · Contrast checker → · Palette generator →

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