#6840D9#6840D9

#6840D9 is a mid, highly saturated violet. Relative luminance 0.116; OKLCH L 51.2% C 0.219 H 288.1°. Best body text is #FFFFFF at 6.32:1 contrast (WCAG AA passes).

Color values

HEX#6840D9
RGBrgb(104, 64, 217)
HSLhsl(256, 67%, 55%)
HSVhsv(256, 71%, 85%)
CMYKcmyk(52.1%, 70.5%, 0%, 14.9%)
CIE-LABlab(40.60, 53.73, -72.37)
CIE-LCHlch(40.60, 90.13, 306.59°)
OKLaboklab(51.16% 0.0678 -0.2079)
OKLCHoklch(51.16% 0.219 288.1)
XYZxyz(20.0630, 11.6186, 66.8177)
Luminance0.1162 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840D9 #B1D940
analogous
#4065D9 #6840D9 #B440D9
triadic
#6840D9 #D96840 #40D968
tetradic
#6840D9 #D94065 #B1D940 #40D9B4
square
#6840D9 #D94065 #B1D940 #40D9B4
split-complementary
#6840D9 #D9B440 #65D940
monochromatic
#361A84 #4B24B7 #6840D9 #9073E3 #B9A6ED

Accessibility & contrast

On white

6.32
#6840D9 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.32
#6840D9 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #6840D9
6.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840D9#FFFFFF#000000##FFFFFF
##6840D91.006.323.326.32
#FFFFFF6.321.0021.001.00
#0000003.3221.001.0021.00
##FFFFFF6.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063DE
Deuteranopia (green-blind)
#005CD6
Tritanopia (blue-blind)
#3C6888
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #6840d9;
/* rgb */ color: rgb(104, 64, 217);
/* oklch */ color: oklch(51.2% 0.219 288.1);
Tailwind
colors: {
  custom: {
    50: '#9d78e6',
    500: '#6840d9',
    950: '#000000',
  },
}
SCSS
$custom: #6840d9;
$custom-light: #9d78e6;
$custom-dark: #000000;
JSON
{
  "hex": "#6840d9",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 217
  },
  "hsl": {
    "h": 255.686,
    "s": 66.812,
    "l": 55.098
  },
  "oklch": {
    "l": 0.51159,
    "c": 0.21871,
    "h": 288.1
  },
  "luminance": 0.1162
}

Semantic roles & 50–950 ramp

primary
#6840D9
secondary
#CADA9A
accent
#EA3EBD
background
#FAF7FE
surface
#F4EDFC
border
#CEC8D5
text
#100916
muted
#7F7B84

Preview Lab

Preview with #6840D9

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

Preview Lab → · Contrast checker → · Palette generator →

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