#9840E3#9840E3

#9840E3 is a mid, highly saturated violet. Relative luminance 0.159; OKLCH L 57.0% C 0.234 H 304.5°. Best body text is #FFFFFF at 5.03:1 contrast (WCAG AA passes).

Color values

HEX#9840E3
RGBrgb(152, 64, 227)
HSLhsl(272, 74%, 57%)
HSVhsv(272, 72%, 89%)
CMYKcmyk(33%, 71.8%, 0%, 11%)
CIE-LABlab(46.83, 64.42, -67.69)
CIE-LCHlch(46.83, 93.44, 313.58°)
OKLaboklab(57.04% 0.1325 -0.1926)
OKLCHoklch(57.04% 0.234 304.5)
XYZxyz(28.6443, 15.8884, 74.2159)
Luminance0.1589 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#9840E3 #8BE340
analogous
#4740E3 #9840E3 #E340DC
triadic
#9840E3 #E39840 #40E398
tetradic
#9840E3 #E34740 #8BE340 #40DCE3
square
#9840E3 #E34740 #8BE340 #40DCE3
split-complementary
#9840E3 #DCE340 #40E347
monochromatic
#591693 #7A1DC8 #9840E3 #B575EB #D2ABF3

Accessibility & contrast

On white

5.03
#9840E3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.18
#9840E3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #9840E3
5.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##9840E3#FFFFFF#000000##FFFFFF
##9840E31.005.034.185.03
#FFFFFF5.031.0021.001.00
#0000004.1821.001.0021.00
##FFFFFF5.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006DE8
Deuteranopia (green-blind)
#006FE0
Tritanopia (blue-blind)
#8A678E
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #9840e3;
/* rgb */ color: rgb(152, 64, 227);
/* oklch */ color: oklch(57.0% 0.234 304.5);
Tailwind
colors: {
  custom: {
    50: '#bc7ced',
    500: '#9840e3',
    950: '#000000',
  },
}
SCSS
$custom: #9840e3;
$custom-light: #bc7ced;
$custom-dark: #000000;
JSON
{
  "hex": "#9840e3",
  "rgb": {
    "r": 152,
    "g": 64,
    "b": 227
  },
  "hsl": {
    "h": 272.393,
    "s": 74.429,
    "l": 57.059
  },
  "oklch": {
    "l": 0.57039,
    "c": 0.23375,
    "h": 304.5
  },
  "luminance": 0.15888
}

Semantic roles & 50–950 ramp

primary
#9840E3
secondary
#BDE19E
accent
#F1378C
background
#FCF7FE
surface
#F8EEFD
border
#D1C9D5
text
#130A16
muted
#827C84

Preview Lab

Preview with #9840E3

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

Preview Lab → · Contrast checker → · Palette generator →

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