#7840BA#7840BA

#7840BA is a mid, vivid violet. Relative luminance 0.112; OKLCH L 50.3% C 0.184 H 301.1°. Best body text is #FFFFFF at 6.48:1 contrast (WCAG AA passes).

Color values

HEX#7840BA
RGBrgb(120, 64, 186)
HSLhsl(268, 49%, 49%)
HSVhsv(268, 66%, 73%)
CMYKcmyk(35.5%, 65.6%, 0%, 27.1%)
CIE-LABlab(39.92, 48.40, -55.41)
CIE-LCHlch(39.92, 73.57, 311.14°)
OKLaboklab(50.32% 0.095 -0.1576)
OKLCHoklch(50.32% 0.184 301.1)
XYZxyz(18.4399, 11.2049, 47.6361)
Luminance0.1120 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840BA #82BA40
analogous
#4045BA #7840BA #B540BA
triadic
#7840BA #BA7840 #40BA78
tetradic
#7840BA #BA4045 #82BA40 #40BAB5
square
#7840BA #BA4045 #82BA40 #40BAB5
split-complementary
#7840BA #BAB540 #45BA40
monochromatic
#3D215F #5B308C #7840BA #986BCC #B799DC

Accessibility & contrast

On white

6.48
#7840BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.24
#7840BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

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

Contrast matrix

fg \ bg##7840BA#FFFFFF#000000##FFFFFF
##7840BA1.006.483.246.48
#FFFFFF6.481.0021.001.00
#0000003.2421.001.0021.00
##FFFFFF6.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DBE
Deuteranopia (green-blind)
#045DB7
Tritanopia (blue-blind)
#6A5B77
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #7840ba;
/* rgb */ color: rgb(120, 64, 186);
/* oklch */ color: oklch(50.3% 0.184 301.1);
Tailwind
colors: {
  custom: {
    50: '#a478cf',
    500: '#7840ba',
    950: '#000000',
  },
}
SCSS
$custom: #7840ba;
$custom-light: #a478cf;
$custom-dark: #000000;
JSON
{
  "hex": "#7840ba",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 267.541,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.50319,
    "c": 0.18398,
    "h": 301.1
  },
  "luminance": 0.11205
}

Semantic roles & 50–950 ramp

primary
#7840BA
secondary
#ADC88E
accent
#D84F9A
background
#FAF7FC
surface
#F4EDF9
border
#CEC8D2
text
#100914
muted
#7F7B82

Preview Lab

Preview with #7840BA

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

Preview Lab → · Contrast checker → · Palette generator →

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