#7840AA#7840AA

#7840AA is a mid, vivid violet. Relative luminance 0.106; OKLCH L 49.2% C 0.166 H 305.5°. Best body text is #FFFFFF at 6.75:1 contrast (WCAG AA passes).

Color values

HEX#7840AA
RGBrgb(120, 64, 170)
HSLhsl(272, 45%, 46%)
HSVhsv(272, 62%, 67%)
CMYKcmyk(29.4%, 62.4%, 0%, 33.3%)
CIE-LABlab(38.83, 44.44, -47.71)
CIE-LCHlch(38.83, 65.20, 312.97°)
OKLaboklab(49.18% 0.0961 -0.1349)
OKLCHoklch(49.18% 0.166 305.5)
XYZxyz(16.8332, 10.5623, 39.1743)
Luminance0.1056 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840AA #72AA40
analogous
#4340AA #7840AA #AA40A7
triadic
#7840AA #AA7840 #40AA78
tetradic
#7840AA #AA4340 #72AA40 #40A7AA
square
#7840AA #AA4340 #72AA40 #40A7AA
split-complementary
#7840AA #A7AA40 #40AA43
monochromatic
#391F51 #592F7E #7840AA #9663C4 #B48FD5

Accessibility & contrast

On white

6.75
#7840AA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.11
#7840AA on #000000
AA ✗AA large ✓AAA ✗

Best text color

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

Contrast matrix

fg \ bg##7840AA#FFFFFF#000000##FFFFFF
##7840AA1.006.753.116.75
#FFFFFF6.751.0021.001.00
#0000003.1121.001.0021.00
##FFFFFF6.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#015AAD
Deuteranopia (green-blind)
#285CA8
Tritanopia (blue-blind)
#6F566F
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #7840aa;
/* rgb */ color: rgb(120, 64, 170);
/* oklch */ color: oklch(49.2% 0.166 305.5);
Tailwind
colors: {
  custom: {
    50: '#a378c4',
    500: '#7840aa',
    950: '#000000',
  },
}
SCSS
$custom: #7840aa;
$custom-light: #a378c4;
$custom-dark: #000000;
JSON
{
  "hex": "#7840aa",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 170
  },
  "hsl": {
    "h": 271.698,
    "s": 45.299,
    "l": 45.882
  },
  "oklch": {
    "l": 0.49183,
    "c": 0.16567,
    "h": 305.5
  },
  "luminance": 0.10562
}

Semantic roles & 50–950 ramp

primary
#7840AA
secondary
#A1C086
accent
#D55390
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#0F0913
muted
#7F7B82

Preview Lab

Preview with #7840AA

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

Preview Lab → · Contrast checker → · Palette generator →

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