#6840C2#6840C2

#6840C2 is a mid, vivid violet. Relative luminance 0.105; OKLCH L 49.2% C 0.192 H 292.0°. Best body text is #FFFFFF at 6.77:1 contrast (WCAG AA passes).

Color values

HEX#6840C2
RGBrgb(104, 64, 194)
HSLhsl(258, 52%, 51%)
HSVhsv(258, 67%, 76%)
CMYKcmyk(46.4%, 67%, 0%, 23.9%)
CIE-LABlab(38.73, 47.32, -62.11)
CIE-LCHlch(38.73, 78.08, 307.30°)
OKLaboklab(49.24% 0.0718 -0.1778)
OKLCHoklch(49.24% 0.192 292)
XYZxyz(17.2772, 10.5043, 52.1457)
Luminance0.1051 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840C2 #9AC240
analogous
#4059C2 #6840C2 #A940C2
triadic
#6840C2 #C26840 #40C268
tetradic
#6840C2 #C24059 #9AC240 #40C2A9
square
#6840C2 #C24059 #9AC240 #40C2A9
split-complementary
#6840C2 #C2A940 #59C240
monochromatic
#362167 #4F3095 #6840C2 #8D6ED1 #B19DE0

Accessibility & contrast

On white

6.77
#6840C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.10
#6840C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #6840C2
6.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840C2#FFFFFF#000000##FFFFFF
##6840C21.006.773.106.77
#FFFFFF6.771.0021.001.00
#0000003.1021.001.0021.00
##FFFFFF6.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DC6
Deuteranopia (green-blind)
#0059BF
Tritanopia (blue-blind)
#4D607C
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #6840c2;
/* rgb */ color: rgb(104, 64, 194);
/* oklch */ color: oklch(49.2% 0.192 292.0);
Tailwind
colors: {
  custom: {
    50: '#9a77d5',
    500: '#6840c2',
    950: '#000000',
  },
}
SCSS
$custom: #6840c2;
$custom-light: #9a77d5;
$custom-dark: #000000;
JSON
{
  "hex": "#6840c2",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 258.462,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.49242,
    "c": 0.19175,
    "h": 292
  },
  "luminance": 0.10505
}

Semantic roles & 50–950 ramp

primary
#6840C2
secondary
#BACC92
accent
#DB4DAF
background
#FAF7FD
surface
#F3EDFA
border
#CDC8D3
text
#0F0914
muted
#7F7B83

Preview Lab

Preview with #6840C2

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

Preview Lab → · Contrast checker → · Palette generator →

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