#7840BF#7840BF

#7840BF is a mid, vivid violet. Relative luminance 0.114; OKLCH L 50.7% C 0.190 H 299.9°. Best body text is #FFFFFF at 6.39:1 contrast (WCAG AA passes).

Color values

HEX#7840BF
RGBrgb(120, 64, 191)
HSLhsl(266, 50%, 50%)
HSVhsv(266, 66%, 75%)
CMYKcmyk(37.2%, 66.5%, 0%, 25.1%)
CIE-LABlab(40.28, 49.66, -57.76)
CIE-LCHlch(40.28, 76.18, 310.69°)
OKLaboklab(50.69% 0.0944 -0.1645)
OKLCHoklch(50.69% 0.19 299.9)
XYZxyz(18.9808, 11.4213, 50.4846)
Luminance0.1142 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7840BF #87BF40
analogous
#4047BF #7840BF #B840BF
triadic
#7840BF #BF7840 #40BF78
tetradic
#7840BF #BF4047 #87BF40 #40BFB8
square
#7840BF #BF4047 #87BF40 #40BFB8
split-complementary
#7840BF #BFB840 #47BF40
monochromatic
#3E2163 #5B3191 #7840BF #986ECE #B99CDE

Accessibility & contrast

On white

6.39
#7840BF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.28
#7840BF on #000000
AA ✗AA large ✓AAA ✗

Best text color

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

Contrast matrix

fg \ bg##7840BF#FFFFFF#000000##FFFFFF
##7840BF1.006.393.286.39
#FFFFFF6.391.0021.001.00
#0000003.2821.001.0021.00
##FFFFFF6.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FC3
Deuteranopia (green-blind)
#005EBC
Tritanopia (blue-blind)
#685D7A
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #7840bf;
/* rgb */ color: rgb(120, 64, 191);
/* oklch */ color: oklch(50.7% 0.190 299.9);
Tailwind
colors: {
  custom: {
    50: '#a478d3',
    500: '#7840bf',
    950: '#000000',
  },
}
SCSS
$custom: #7840bf;
$custom-light: #a478d3;
$custom-dark: #000000;
JSON
{
  "hex": "#7840bf",
  "rgb": {
    "r": 120,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 266.457,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.50689,
    "c": 0.18966,
    "h": 299.9
  },
  "luminance": 0.11421
}

Semantic roles & 50–950 ramp

primary
#7840BF
secondary
#B1CA91
accent
#D94E9C
background
#FAF7FD
surface
#F4EDFA
border
#CEC8D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7840BF

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

Preview Lab → · Contrast checker → · Palette generator →

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