#6840B3#6840B3

#6840B3 is a mid, vivid violet. Relative luminance 0.099; OKLCH L 48.1% C 0.174 H 295.0°. Best body text is #FFFFFF at 7.06:1 contrast (WCAG AA passes).

Color values

HEX#6840B3
RGBrgb(104, 64, 179)
HSLhsl(261, 47%, 48%)
HSVhsv(261, 64%, 70%)
CMYKcmyk(41.9%, 64.2%, 0%, 29.8%)
CIE-LABlab(37.60, 43.18, -55.14)
CIE-LCHlch(37.60, 70.03, 308.07°)
OKLaboklab(48.07% 0.0735 -0.1573)
OKLCHoklch(48.07% 0.174 295)
XYZxyz(15.6768, 9.8642, 43.7171)
Luminance0.0987 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#6840B3 #8BB340
analogous
#4051B3 #6840B3 #A240B3
triadic
#6840B3 #B36840 #40B368
tetradic
#6840B3 #B34051 #8BB340 #40B3A2
square
#6840B3 #B34051 #8BB340 #40B3A2
split-complementary
#6840B3 #B3A240 #51B340
monochromatic
#342059 #4E3086 #6840B3 #8967C9 #AC94D9

Accessibility & contrast

On white

7.06
#6840B3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.97
#6840B3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #6840B3
7.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##6840B3#FFFFFF#000000##FFFFFF
##6840B31.007.062.977.06
#FFFFFF7.061.0021.001.00
#0000002.9721.001.0021.00
##FFFFFF7.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0059B7
Deuteranopia (green-blind)
#0057B1
Tritanopia (blue-blind)
#545A74
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #6840b3;
/* rgb */ color: rgb(104, 64, 179);
/* oklch */ color: oklch(48.1% 0.174 295.0);
Tailwind
colors: {
  custom: {
    50: '#9977ca',
    500: '#6840b3',
    950: '#000000',
  },
}
SCSS
$custom: #6840b3;
$custom-light: #9977ca;
$custom-dark: #000000;
JSON
{
  "hex": "#6840b3",
  "rgb": {
    "r": 104,
    "g": 64,
    "b": 179
  },
  "hsl": {
    "h": 260.87,
    "s": 47.325,
    "l": 47.647
  },
  "oklch": {
    "l": 0.48067,
    "c": 0.17365,
    "h": 295
  },
  "luminance": 0.09865
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #6840B3

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

Preview Lab → · Contrast checker → · Palette generator →

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