#6840D4#6840D4

#6840D4 is a mid, highly saturated violet. Relative luminance 0.114; OKLCH L 50.7% C 0.213 H 288.8°. Best body text is #FFFFFF at 6.42:1 contrast (WCAG AA passes).

Color values

HEX#6840D4
RGBrgb(104, 64, 212)
HSLhsl(256, 63%, 54%)
HSVhsv(256, 70%, 83%)
CMYKcmyk(50.9%, 69.8%, 0%, 16.9%)
CIE-LABlab(40.18, 52.33, -70.18)
CIE-LCHlch(40.18, 87.54, 306.71°)
OKLaboklab(50.73% 0.0688 -0.2015)
OKLCHoklch(50.73% 0.213 288.8)
XYZxyz(19.4225, 11.3624, 63.4444)
Luminance0.1136 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840D4 #ACD440
analogous
#4062D4 #6840D4 #B240D4
triadic
#6840D4 #D46840 #40D468
tetradic
#6840D4 #D44062 #ACD440 #40D4B2
square
#6840D4 #D44062 #ACD440 #40D4B2
split-complementary
#6840D4 #D4B240 #62D440
monochromatic
#361C7D #4C27AF #6840D4 #8F72DF #B7A4EA

Accessibility & contrast

On white

6.42
#6840D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.27
#6840D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #6840D4
6.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840D4#FFFFFF#000000##FFFFFF
##6840D41.006.423.276.42
#FFFFFF6.421.0021.001.00
#0000003.2721.001.0021.00
##FFFFFF6.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062D8
Deuteranopia (green-blind)
#005BD1
Tritanopia (blue-blind)
#416685
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #6840d4;
/* rgb */ color: rgb(104, 64, 212);
/* oklch */ color: oklch(50.7% 0.213 288.8);
Tailwind
colors: {
  custom: {
    50: '#9d78e2',
    500: '#6840d4',
    950: '#000000',
  },
}
SCSS
$custom: #6840d4;
$custom-light: #9d78e2;
$custom-dark: #000000;
JSON
{
  "hex": "#6840d4",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 256.216,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.50731,
    "c": 0.21294,
    "h": 288.8
  },
  "luminance": 0.11363
}

Semantic roles & 50–950 ramp

primary
#6840D4
secondary
#C6D798
accent
#E642BA
background
#FAF7FE
surface
#F4EDFC
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #6840D4

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

Preview Lab → · Contrast checker → · Palette generator →

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