#6840C5#6840C5

#6840C5 is a mid, vivid violet. Relative luminance 0.106; OKLCH L 49.5% C 0.195 H 291.4°. Best body text is #FFFFFF at 6.71:1 contrast (WCAG AA passes).

Color values

HEX#6840C5
RGBrgb(104, 64, 197)
HSLhsl(258, 53%, 51%)
HSVhsv(258, 68%, 77%)
CMYKcmyk(47.2%, 67.5%, 0%, 22.7%)
CIE-LABlab(38.97, 48.15, -63.48)
CIE-LCHlch(38.97, 79.67, 307.18°)
OKLaboklab(49.48% 0.0713 -0.1818)
OKLCHoklch(49.48% 0.195 291.4)
XYZxyz(17.6175, 10.6404, 53.9380)
Luminance0.1064 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840C5 #9DC540
analogous
#405AC5 #6840C5 #AA40C5
triadic
#6840C5 #C56840 #40C568
tetradic
#6840C5 #C5405A #9DC540 #40C5AA
square
#6840C5 #C5405A #9DC540 #40C5AA
split-complementary
#6840C5 #C5AA40 #5AC540
monochromatic
#37206A #4F2F99 #6840C5 #8D6FD3 #B29EE2

Accessibility & contrast

On white

6.71
#6840C5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.13
#6840C5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #6840C5
6.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840C5#FFFFFF#000000##FFFFFF
##6840C51.006.713.136.71
#FFFFFF6.711.0021.001.00
#0000003.1321.001.0021.00
##FFFFFF6.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005EC9
Deuteranopia (green-blind)
#0059C2
Tritanopia (blue-blind)
#4B617D
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #6840c5;
/* rgb */ color: rgb(104, 64, 197);
/* oklch */ color: oklch(49.5% 0.195 291.4);
Tailwind
colors: {
  custom: {
    50: '#9b78d8',
    500: '#6840c5',
    950: '#000000',
  },
}
SCSS
$custom: #6840c5;
$custom-light: #9b78d8;
$custom-dark: #000000;
JSON
{
  "hex": "#6840c5",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 197
  },
  "hsl": {
    "h": 258.045,
    "s": 53.414,
    "l": 51.176
  },
  "oklch": {
    "l": 0.49484,
    "c": 0.19532,
    "h": 291.4
  },
  "luminance": 0.10641
}

Semantic roles & 50–950 ramp

primary
#6840C5
secondary
#BCCE93
accent
#DD4BB1
background
#FAF7FD
surface
#F3EDFA
border
#CDC8D3
text
#0F0915
muted
#7F7B83

Preview Lab

Preview with #6840C5

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

Preview Lab → · Contrast checker → · Palette generator →

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