#7840AF#7840AF

#7840AF is a mid, vivid violet. Relative luminance 0.108; OKLCH L 49.5% C 0.171 H 304.0°. Best body text is #FFFFFF at 6.66:1 contrast (WCAG AA passes).

Color values

HEX#7840AF
RGBrgb(120, 64, 175)
HSLhsl(270, 46%, 47%)
HSVhsv(270, 63%, 69%)
CMYKcmyk(31.4%, 63.4%, 0%, 31.4%)
CIE-LABlab(39.16, 45.66, -50.14)
CIE-LCHlch(39.16, 67.82, 312.32°)
OKLaboklab(49.53% 0.0959 -0.1421)
OKLCHoklch(49.53% 0.171 304)
XYZxyz(17.3152, 10.7551, 41.7129)
Luminance0.1076 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840AF #77AF40
analogous
#4040AF #7840AF #AF40AF
triadic
#7840AF #AF7840 #40AF78
tetradic
#7840AF #AF4040 #77AF40 #40AFAF
square
#7840AF #AF4040 #77AF40 #40AFAF
split-complementary
#7840AF #AFAF40 #40AF40
monochromatic
#3B1F55 #593082 #7840AF #9765C7 #B592D7

Accessibility & contrast

On white

6.66
#7840AF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.15
#7840AF on #000000
AA ✗AA large ✓AAA ✗

Best text color

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

Contrast matrix

fg \ bg##7840AF#FFFFFF#000000##FFFFFF
##7840AF1.006.663.156.66
#FFFFFF6.661.0021.001.00
#0000003.1521.001.0021.00
##FFFFFF6.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BB2
Deuteranopia (green-blind)
#215CAD
Tritanopia (blue-blind)
#6E5771
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #7840af;
/* rgb */ color: rgb(120, 64, 175);
/* oklch */ color: oklch(49.5% 0.171 304.0);
Tailwind
colors: {
  custom: {
    50: '#a378c7',
    500: '#7840af',
    950: '#000000',
  },
}
SCSS
$custom: #7840af;
$custom-light: #a378c7;
$custom-dark: #000000;
JSON
{
  "hex": "#7840af",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 175
  },
  "hsl": {
    "h": 270.27,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.4953,
    "c": 0.1714,
    "h": 304
  },
  "luminance": 0.10755
}

Semantic roles & 50–950 ramp

primary
#7840AF
secondary
#A5C388
accent
#D65293
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#0F0913
muted
#7F7B82

Preview Lab

Preview with #7840AF

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

Preview Lab → · Contrast checker → · Palette generator →

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