#7840C2#7840C2

#7840C2 is a mid, vivid violet. Relative luminance 0.116; OKLCH L 50.9% C 0.193 H 299.2°. Best body text is #FFFFFF at 6.34:1 contrast (WCAG AA passes).

Color values

HEX#7840C2
RGBrgb(120, 64, 194)
HSLhsl(266, 52%, 51%)
HSVhsv(266, 67%, 76%)
CMYKcmyk(38.1%, 67%, 0%, 23.9%)
CIE-LABlab(40.50, 50.42, -59.16)
CIE-LCHlch(40.50, 77.73, 310.44°)
OKLaboklab(50.91% 0.094 -0.1686)
OKLCHoklch(50.91% 0.193 299.2)
XYZxyz(19.3143, 11.5547, 52.2412)
Luminance0.1155 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840C2 #8AC240
analogous
#4049C2 #7840C2 #B940C2
triadic
#7840C2 #C27840 #40C278
tetradic
#7840C2 #C24049 #8AC240 #40C2B9
square
#7840C2 #C24049 #8AC240 #40C2B9
split-complementary
#7840C2 #C2B940 #49C240
monochromatic
#3F2167 #5B3095 #7840C2 #996ED1 #BA9DE0

Accessibility & contrast

On white

6.34
#7840C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.31
#7840C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

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

Contrast matrix

fg \ bg##7840C2#FFFFFF#000000##FFFFFF
##7840C21.006.343.316.34
#FFFFFF6.341.0021.001.00
#0000003.3121.001.0021.00
##FFFFFF6.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FC6
Deuteranopia (green-blind)
#005EBF
Tritanopia (blue-blind)
#675E7C
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #7840c2;
/* rgb */ color: rgb(120, 64, 194);
/* oklch */ color: oklch(50.9% 0.193 299.2);
Tailwind
colors: {
  custom: {
    50: '#a579d5',
    500: '#7840c2',
    950: '#000000',
  },
}
SCSS
$custom: #7840c2;
$custom-light: #a579d5;
$custom-dark: #000000;
JSON
{
  "hex": "#7840c2",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 265.846,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.50914,
    "c": 0.19306,
    "h": 299.2
  },
  "luminance": 0.11555
}

Semantic roles & 50–950 ramp

primary
#7840C2
secondary
#B3CC92
accent
#DB4D9E
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7840C2

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

Preview Lab → · Contrast checker → · Palette generator →

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