#7840CB#7840CB

#7840CB is a mid, highly saturated violet. Relative luminance 0.120; OKLCH L 51.6% C 0.203 H 297.2°. Best body text is #FFFFFF at 6.19:1 contrast (WCAG AA passes).

Color values

HEX#7840CB
RGBrgb(120, 64, 203)
HSLhsl(264, 57%, 52%)
HSVhsv(264, 68%, 80%)
CMYKcmyk(40.9%, 68.5%, 0%, 20.4%)
CIE-LABlab(41.17, 52.72, -63.30)
CIE-LCHlch(41.17, 82.38, 309.79°)
OKLaboklab(51.61% 0.0928 -0.1808)
OKLCHoklch(51.61% 0.203 297.2)
XYZxyz(20.3558, 11.9713, 57.7266)
Luminance0.1197 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840CB #93CB40
analogous
#404DCB #7840CB #BE40CB
triadic
#7840CB #CB7840 #40CB78
tetradic
#7840CB #CB404D #93CB40 #40CBBE
square
#7840CB #CB404D #93CB40 #40CBBE
split-complementary
#7840CB #CBBE40 #4DCB40
monochromatic
#401F72 #5B2CA2 #7840CB #9A70D8 #BCA0E5

Accessibility & contrast

On white

6.19
#7840CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.39
#7840CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7840CB
6.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7840CB#FFFFFF#000000##FFFFFF
##7840CB1.006.193.396.19
#FFFFFF6.191.0021.001.00
#0000003.3921.001.0021.00
##FFFFFF6.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062CF
Deuteranopia (green-blind)
#005FC8
Tritanopia (blue-blind)
#636281
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7840cb;
/* rgb */ color: rgb(120, 64, 203);
/* oklch */ color: oklch(51.6% 0.203 297.2);
Tailwind
colors: {
  custom: {
    50: '#a579dc',
    500: '#7840cb',
    950: '#000000',
  },
}
SCSS
$custom: #7840cb;
$custom-light: #a579dc;
$custom-dark: #000000;
JSON
{
  "hex": "#7840cb",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 264.173,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.51606,
    "c": 0.20319,
    "h": 297.2
  },
  "luminance": 0.11972
}

Semantic roles & 50–950 ramp

primary
#7840CB
secondary
#B9D295
accent
#E047A3
background
#FAF7FD
surface
#F4EEFB
border
#CEC9D4
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7840CB

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

Preview Lab → · Contrast checker → · Palette generator →

#7840CB Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva