#7840B7#7840B7

#7840B7 is a mid, vivid violet. Relative luminance 0.111; OKLCH L 50.1% C 0.181 H 301.8°. Best body text is #FFFFFF at 6.53:1 contrast (WCAG AA passes).

Color values

HEX#7840B7
RGBrgb(120, 64, 183)
HSLhsl(268, 48%, 48%)
HSVhsv(268, 65%, 72%)
CMYKcmyk(34.4%, 65%, 0%, 28.2%)
CIE-LABlab(39.71, 47.65, -53.99)
CIE-LCHlch(39.71, 72.01, 311.43°)
OKLaboklab(50.1% 0.0953 -0.1534)
OKLCHoklch(50.1% 0.181 301.8)
XYZxyz(18.1243, 11.0787, 45.9741)
Luminance0.1108 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840B7 #7FB740
analogous
#4044B7 #7840B7 #B340B7
triadic
#7840B7 #B77840 #40B778
tetradic
#7840B7 #B74044 #7FB740 #40B7B3
square
#7840B7 #B74044 #7FB740 #40B7B3
split-complementary
#7840B7 #B7B340 #44B740
monochromatic
#3D205C #5A308A #7840B7 #9769CB #B797DB

Accessibility & contrast

On white

6.53
#7840B7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.22
#7840B7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

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

Contrast matrix

fg \ bg##7840B7#FFFFFF#000000##FFFFFF
##7840B71.006.533.226.53
#FFFFFF6.531.0021.001.00
#0000003.2221.001.0021.00
##FFFFFF6.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DBB
Deuteranopia (green-blind)
#105DB4
Tritanopia (blue-blind)
#6B5A76
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #7840b7;
/* rgb */ color: rgb(120, 64, 183);
/* oklch */ color: oklch(50.1% 0.181 301.8);
Tailwind
colors: {
  custom: {
    50: '#a478cd',
    500: '#7840b7',
    950: '#000000',
  },
}
SCSS
$custom: #7840b7;
$custom-light: #a478cd;
$custom-dark: #000000;
JSON
{
  "hex": "#7840b7",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 268.235,
    "s": 48.178,
    "l": 48.431
  },
  "oklch": {
    "l": 0.501,
    "c": 0.18057,
    "h": 301.8
  },
  "luminance": 0.11079
}

Semantic roles & 50–950 ramp

primary
#7840B7
secondary
#ABC68D
accent
#D85098
background
#FAF7FC
surface
#F4EDF9
border
#CEC8D2
text
#100914
muted
#7F7B82

Preview Lab

Preview with #7840B7

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

Preview Lab → · Contrast checker → · Palette generator →

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