#7E40C0#7E40C0

#7E40C0 is a mid, vivid violet. Relative luminance 0.119; OKLCH L 51.4% C 0.192 H 302.3°. Best body text is #FFFFFF at 6.21:1 contrast (WCAG AA passes).

Color values

HEX#7E40C0
RGBrgb(126, 64, 192)
HSLhsl(269, 50%, 50%)
HSVhsv(269, 67%, 75%)
CMYKcmyk(34.4%, 66.7%, 0%, 24.7%)
CIE-LABlab(41.07, 51.16, -57.03)
CIE-LCHlch(41.07, 76.61, 311.89°)
OKLaboklab(51.44% 0.1025 -0.1621)
OKLCHoklch(51.44% 0.192 302.3)
XYZxyz(19.9498, 11.9081, 51.1064)
Luminance0.1191 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40C0 #82C040
analogous
#4042C0 #7E40C0 #BE40C0
triadic
#7E40C0 #C07E40 #40C07E
tetradic
#7E40C0 #C04042 #82C040 #40C0BE
square
#7E40C0 #C04042 #82C040 #40C0BE
split-complementary
#7E40C0 #C0BE40 #42C040
monochromatic
#422164 #603092 #7E40C0 #9D6ECF #BC9CDE

Accessibility & contrast

On white

6.21
#7E40C0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.38
#7E40C0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40C0
6.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40C0#FFFFFF#000000##FFFFFF
##7E40C01.006.213.386.21
#FFFFFF6.211.0021.001.00
#0000003.3821.001.0021.00
##FFFFFF6.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C4
Deuteranopia (green-blind)
#0260BD
Tritanopia (blue-blind)
#715D7B
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7e40c0;
/* rgb */ color: rgb(126, 64, 192);
/* oklch */ color: oklch(51.4% 0.192 302.3);
Tailwind
colors: {
  custom: {
    50: '#a879d4',
    500: '#7e40c0',
    950: '#000000',
  },
}
SCSS
$custom: #7e40c0;
$custom-light: #a879d4;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40c0",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 192
  },
  "hsl": {
    "h": 269.063,
    "s": 50.394,
    "l": 50.196
  },
  "oklch": {
    "l": 0.51437,
    "c": 0.19185,
    "h": 302.3
  },
  "luminance": 0.11908
}

Semantic roles & 50–950 ramp

primary
#7E40C0
secondary
#AFCB91
accent
#DA4E96
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7E40C0

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

Preview Lab → · Contrast checker → · Palette generator →

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