#6840C7#6840C7

#6840C7 is a mid, vivid violet. Relative luminance 0.107; OKLCH L 49.6% C 0.198 H 291.1°. Best body text is #FFFFFF at 6.67:1 contrast (WCAG AA passes).

Color values

HEX#6840C7
RGBrgb(104, 64, 199)
HSLhsl(258, 55%, 52%)
HSVhsv(258, 68%, 78%)
CMYKcmyk(47.7%, 67.8%, 0%, 22%)
CIE-LABlab(39.13, 48.71, -64.38)
CIE-LCHlch(39.13, 80.73, 307.11°)
OKLaboklab(49.65% 0.071 -0.1845)
OKLCHoklch(49.65% 0.198 291.1)
XYZxyz(17.8482, 10.7327, 55.1530)
Luminance0.1073 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840C7 #9FC740
analogous
#405CC7 #6840C7 #AC40C7
triadic
#6840C7 #C76840 #40C768
tetradic
#6840C7 #C7405C #9FC740 #40C7AC
square
#6840C7 #C7405C #9FC740 #40C7AC
split-complementary
#6840C7 #C7AC40 #5CC740
monochromatic
#37206D #4E2E9C #6840C7 #8D6FD5 #B39FE3

Accessibility & contrast

On white

6.67
#6840C7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.15
#6840C7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #6840C7
6.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840C7#FFFFFF#000000##FFFFFF
##6840C71.006.673.156.67
#FFFFFF6.671.0021.001.00
#0000003.1521.001.0021.00
##FFFFFF6.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECB
Deuteranopia (green-blind)
#0059C4
Tritanopia (blue-blind)
#4A627E
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #6840c7;
/* rgb */ color: rgb(104, 64, 199);
/* oklch */ color: oklch(49.6% 0.198 291.1);
Tailwind
colors: {
  custom: {
    50: '#9b78d9',
    500: '#6840c7',
    950: '#000000',
  },
}
SCSS
$custom: #6840c7;
$custom-light: #9b78d9;
$custom-dark: #000000;
JSON
{
  "hex": "#6840c7",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 257.778,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.49647,
    "c": 0.19769,
    "h": 291.1
  },
  "luminance": 0.10733
}

Semantic roles & 50–950 ramp

primary
#6840C7
secondary
#BDCF94
accent
#DE4AB2
background
#FAF7FD
surface
#F3EDFB
border
#CDC8D4
text
#0F0915
muted
#7F7B83

Preview Lab

Preview with #6840C7

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

Preview Lab → · Contrast checker → · Palette generator →

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