#7840D8#7840D8

#7840D8 is a mid, highly saturated violet. Relative luminance 0.126; OKLCH L 52.6% C 0.218 H 294.6°. Best body text is #FFFFFF at 5.96:1 contrast (WCAG AA passes).

Color values

HEX#7840D8
RGBrgb(120, 64, 216)
HSLhsl(262, 66%, 55%)
HSVhsv(262, 70%, 85%)
CMYKcmyk(44.4%, 70.4%, 0%, 15.3%)
CIE-LABlab(42.18, 56.08, -69.15)
CIE-LCHlch(42.18, 89.03, 309.04°)
OKLaboklab(52.64% 0.0905 -0.198)
OKLCHoklch(52.64% 0.218 294.6)
XYZxyz(21.9704, 12.6171, 66.2302)
Luminance0.1262 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840D8 #A0D840
analogous
#4054D8 #7840D8 #C440D8
triadic
#7840D8 #D87840 #40D878
tetradic
#7840D8 #D84054 #A0D840 #40D8C4
square
#7840D8 #D84054 #A0D840 #40D8C4
split-complementary
#7840D8 #D8C440 #54D840
monochromatic
#411B83 #5A25B6 #7840D8 #9C73E2 #C0A6ED

Accessibility & contrast

On white

5.96
#7840D8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.52
#7840D8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7840D8
5.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7840D8#FFFFFF#000000##FFFFFF
##7840D81.005.963.525.96
#FFFFFF5.961.0021.001.00
#0000003.5221.001.0021.00
##FFFFFF5.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065DC
Deuteranopia (green-blind)
#0061D5
Tritanopia (blue-blind)
#5D6788
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #7840d8;
/* rgb */ color: rgb(120, 64, 216);
/* oklch */ color: oklch(52.6% 0.218 294.6);
Tailwind
colors: {
  custom: {
    50: '#a779e5',
    500: '#7840d8',
    950: '#000000',
  },
}
SCSS
$custom: #7840d8;
$custom-light: #a779e5;
$custom-dark: #000000;
JSON
{
  "hex": "#7840d8",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 216
  },
  "hsl": {
    "h": 262.105,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.5264,
    "c": 0.21767,
    "h": 294.6
  },
  "luminance": 0.12618
}

Semantic roles & 50–950 ramp

primary
#7840D8
secondary
#C2DA9A
accent
#E93FAA
background
#FAF7FE
surface
#F4EEFC
border
#CEC9D5
text
#100916
muted
#7F7B84

Preview Lab

Preview with #7840D8

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

Preview Lab → · Contrast checker → · Palette generator →

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