#7E40C6#7E40C6

#7E40C6 is a mid, vivid violet. Relative luminance 0.122; OKLCH L 51.9% C 0.198 H 300.9°. Best body text is #FFFFFF at 6.11:1 contrast (WCAG AA passes).

Color values

HEX#7E40C6
RGBrgb(126, 64, 198)
HSLhsl(268, 54%, 51%)
HSVhsv(268, 68%, 78%)
CMYKcmyk(36.4%, 67.7%, 0%, 22.4%)
CIE-LABlab(41.50, 52.63, -59.83)
CIE-LCHlch(41.50, 79.69, 311.34°)
OKLaboklab(51.88% 0.1018 -0.1704)
OKLCHoklch(51.88% 0.198 300.9)
XYZxyz(20.6281, 12.1795, 54.6792)
Luminance0.1218 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40C6 #88C640
analogous
#4045C6 #7E40C6 #C140C6
triadic
#7E40C6 #C67E40 #40C67E
tetradic
#7E40C6 #C64045 #88C640 #40C6C1
square
#7E40C6 #C64045 #88C640 #40C6C1
split-complementary
#7E40C6 #C6C140 #45C640
monochromatic
#43206C #602E9B #7E40C6 #9E6FD4 #BE9EE2

Accessibility & contrast

On white

6.11
#7E40C6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.44
#7E40C6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40C6
6.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40C6#FFFFFF#000000##FFFFFF
##7E40C61.006.113.446.11
#FFFFFF6.111.0021.001.00
#0000003.4421.001.0021.00
##FFFFFF6.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061CA
Deuteranopia (green-blind)
#0061C3
Tritanopia (blue-blind)
#6E5F7E
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7e40c6;
/* rgb */ color: rgb(126, 64, 198);
/* oklch */ color: oklch(51.9% 0.198 300.9);
Tailwind
colors: {
  custom: {
    50: '#a979d8',
    500: '#7e40c6',
    950: '#000000',
  },
}
SCSS
$custom: #7e40c6;
$custom-light: #a979d8;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40c6",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 198
  },
  "hsl": {
    "h": 267.761,
    "s": 54.032,
    "l": 51.373
  },
  "oklch": {
    "l": 0.51882,
    "c": 0.19847,
    "h": 300.9
  },
  "luminance": 0.1218
}

Semantic roles & 50–950 ramp

primary
#7E40C6
secondary
#B3CE93
accent
#DD4A99
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7E40C6

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

Preview Lab → · Contrast checker → · Palette generator →

#7E40C6 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva