#7E40C7#7E40C7

#7E40C7 is a mid, vivid violet. Relative luminance 0.122; OKLCH L 52.0% C 0.200 H 300.6°. Best body text is #FFFFFF at 6.10:1 contrast (WCAG AA passes).

Color values

HEX#7E40C7
RGBrgb(126, 64, 199)
HSLhsl(268, 55%, 52%)
HSVhsv(268, 68%, 78%)
CMYKcmyk(36.7%, 67.8%, 0%, 22%)
CIE-LABlab(41.57, 52.88, -60.30)
CIE-LCHlch(41.57, 80.20, 311.25°)
OKLaboklab(51.96% 0.1017 -0.1717)
OKLCHoklch(51.96% 0.2 300.6)
XYZxyz(20.7439, 12.2258, 55.2887)
Luminance0.1223 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40C7 #89C740
analogous
#4046C7 #7E40C7 #C240C7
triadic
#7E40C7 #C77E40 #40C77E
tetradic
#7E40C7 #C74046 #89C740 #40C7C2
square
#7E40C7 #C74046 #89C740 #40C7C2
split-complementary
#7E40C7 #C7C240 #46C740
monochromatic
#43206D #602E9C #7E40C7 #9E6FD5 #BE9FE3

Accessibility & contrast

On white

6.10
#7E40C7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.45
#7E40C7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40C7
6.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40C7#FFFFFF#000000##FFFFFF
##7E40C71.006.103.456.10
#FFFFFF6.101.0021.001.00
#0000003.4521.001.0021.00
##FFFFFF6.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062CB
Deuteranopia (green-blind)
#0061C4
Tritanopia (blue-blind)
#6E5F7E
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7e40c7;
/* rgb */ color: rgb(126, 64, 199);
/* oklch */ color: oklch(52.0% 0.200 300.6);
Tailwind
colors: {
  custom: {
    50: '#a979d9',
    500: '#7e40c7',
    950: '#000000',
  },
}
SCSS
$custom: #7e40c7;
$custom-light: #a979d9;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40c7",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 267.556,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.51957,
    "c": 0.19957,
    "h": 300.6
  },
  "luminance": 0.12226
}

Semantic roles & 50–950 ramp

primary
#7E40C7
secondary
#B4CF94
accent
#DE4A9A
background
#FAF7FD
surface
#F4EEFB
border
#CEC9D4
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7E40C7

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

Preview Lab → · Contrast checker → · Palette generator →

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