#6840E7#6840E7

#6840E7 is a mid, highly saturated violet. Relative luminance 0.124; OKLCH L 52.4% C 0.235 H 286.1°. Best body text is #FFFFFF at 6.04:1 contrast (WCAG AA passes).

Color values

HEX#6840E7
RGBrgb(104, 64, 231)
HSLhsl(254, 78%, 58%)
HSVhsv(254, 72%, 91%)
CMYKcmyk(55%, 72.3%, 0%, 9.4%)
CIE-LABlab(41.81, 57.63, -78.37)
CIE-LCHlch(41.81, 97.28, 306.33°)
OKLaboklab(52.38% 0.0649 -0.2255)
OKLCHoklch(52.38% 0.235 286.1)
XYZxyz(21.9618, 12.3781, 76.8178)
Luminance0.1238 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840E7 #BFE740
analogous
#406CE7 #6840E7 #BB40E7
triadic
#6840E7 #E76840 #40E768
tetradic
#6840E7 #E7406C #BFE740 #40E7BB
square
#6840E7 #E7406C #BFE740 #40E7BB
split-complementary
#6840E7 #E7BB40 #6CE740
monochromatic
#331399 #461AD0 #6840E7 #9376EE #BEADF5

Accessibility & contrast

On white

6.04
#6840E7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.48
#6840E7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #6840E7
6.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840E7#FFFFFF#000000##FFFFFF
##6840E71.006.043.486.04
#FFFFFF6.041.0021.001.00
#0000003.4821.001.0021.00
##FFFFFF6.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0067EC
Deuteranopia (green-blind)
#005EE4
Tritanopia (blue-blind)
#2E6E90
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #6840e7;
/* rgb */ color: rgb(104, 64, 231);
/* oklch */ color: oklch(52.4% 0.235 286.1);
Tailwind
colors: {
  custom: {
    50: '#9f79f0',
    500: '#6840e7',
    950: '#000000',
  },
}
SCSS
$custom: #6840e7;
$custom-light: #9f79f0;
$custom-dark: #000000;
JSON
{
  "hex": "#6840e7",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 231
  },
  "hsl": {
    "h": 254.371,
    "s": 77.674,
    "l": 57.843
  },
  "oklch": {
    "l": 0.52384,
    "c": 0.23468,
    "h": 286.1
  },
  "luminance": 0.12379
}

Semantic roles & 50–950 ramp

primary
#6840E7
secondary
#D3E3A0
accent
#F434C6
background
#FAF7FE
surface
#F4EEFD
border
#CEC9D5
text
#100917
muted
#7F7B85

Preview Lab

Preview with #6840E7

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

Preview Lab → · Contrast checker → · Palette generator →

#6840E7 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva