#6840B2#6840B2

#6840B2 is a mid, vivid violet. Relative luminance 0.098; OKLCH L 48.0% C 0.172 H 295.3°. Best body text is #FFFFFF at 7.08:1 contrast (WCAG AA passes).

Color values

HEX#6840B2
RGBrgb(104, 64, 178)
HSLhsl(261, 47%, 47%)
HSVhsv(261, 64%, 70%)
CMYKcmyk(41.6%, 64%, 0%, 30.2%)
CIE-LABlab(37.52, 42.91, -54.66)
CIE-LCHlch(37.52, 69.49, 308.13°)
OKLaboklab(47.99% 0.0736 -0.1559)
OKLCHoklch(47.99% 0.172 295.3)
XYZxyz(15.5761, 9.8239, 43.1864)
Luminance0.0982 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840B2 #8AB240
analogous
#4051B2 #6840B2 #A140B2
triadic
#6840B2 #B26840 #40B268
tetradic
#6840B2 #B24051 #8AB240 #40B2A1
square
#6840B2 #B24051 #8AB240 #40B2A1
split-complementary
#6840B2 #B2A140 #51B240
monochromatic
#332058 #4E3085 #6840B2 #8967C8 #AC94D8

Accessibility & contrast

On white

7.08
#6840B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.96
#6840B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #6840B2
7.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840B2#FFFFFF#000000##FFFFFF
##6840B21.007.082.967.08
#FFFFFF7.081.0021.001.00
#0000002.9621.001.0021.00
##FFFFFF7.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0059B6
Deuteranopia (green-blind)
#0057B0
Tritanopia (blue-blind)
#555A73
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #6840b2;
/* rgb */ color: rgb(104, 64, 178);
/* oklch */ color: oklch(48.0% 0.172 295.3);
Tailwind
colors: {
  custom: {
    50: '#9977ca',
    500: '#6840b2',
    950: '#000000',
  },
}
SCSS
$custom: #6840b2;
$custom-light: #9977ca;
$custom-dark: #000000;
JSON
{
  "hex": "#6840b2",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 261.053,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.47991,
    "c": 0.17243,
    "h": 295.3
  },
  "luminance": 0.09824
}

Semantic roles & 50–950 ramp

primary
#6840B2
secondary
#B0C48A
accent
#D751A8
background
#F9F7FC
surface
#F2EDF8
border
#CCC8D1
text
#0E0913
muted
#7E7B82

Preview Lab

Preview with #6840B2

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

Preview Lab → · Contrast checker → · Palette generator →

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