#7E40C5#7E40C5

#7E40C5 is a mid, vivid violet. Relative luminance 0.121; OKLCH L 51.8% C 0.197 H 301.1°. Best body text is #FFFFFF at 6.13:1 contrast (WCAG AA passes).

Color values

HEX#7E40C5
RGBrgb(126, 64, 197)
HSLhsl(268, 53%, 51%)
HSVhsv(268, 68%, 77%)
CMYKcmyk(36%, 67.5%, 0%, 22.7%)
CIE-LABlab(41.43, 52.38, -59.37)
CIE-LCHlch(41.43, 79.18, 311.42°)
OKLaboklab(51.81% 0.1019 -0.169)
OKLCHoklch(51.81% 0.197 301.1)
XYZxyz(20.5132, 12.1335, 54.0738)
Luminance0.1213 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40C5 #87C540
analogous
#4044C5 #7E40C5 #C040C5
triadic
#7E40C5 #C57E40 #40C57E
tetradic
#7E40C5 #C54044 #87C540 #40C5C0
square
#7E40C5 #C54044 #87C540 #40C5C0
split-complementary
#7E40C5 #C5C040 #44C540
monochromatic
#43206A #602F99 #7E40C5 #9E6FD3 #BD9EE2

Accessibility & contrast

On white

6.13
#7E40C5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.43
#7E40C5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40C5
6.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40C5#FFFFFF#000000##FFFFFF
##7E40C51.006.133.436.13
#FFFFFF6.131.0021.001.00
#0000003.4321.001.0021.00
##FFFFFF6.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061C9
Deuteranopia (green-blind)
#0061C2
Tritanopia (blue-blind)
#6F5F7D
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7e40c5;
/* rgb */ color: rgb(126, 64, 197);
/* oklch */ color: oklch(51.8% 0.197 301.1);
Tailwind
colors: {
  custom: {
    50: '#a979d7',
    500: '#7e40c5',
    950: '#000000',
  },
}
SCSS
$custom: #7e40c5;
$custom-light: #a979d7;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40c5",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 197
  },
  "hsl": {
    "h": 267.97,
    "s": 53.414,
    "l": 51.176
  },
  "oklch": {
    "l": 0.51807,
    "c": 0.19737,
    "h": 301.1
  },
  "luminance": 0.12134
}

Semantic roles & 50–950 ramp

primary
#7E40C5
secondary
#B2CE93
accent
#DD4B99
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7E40C5

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

Preview Lab → · Contrast checker → · Palette generator →

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