#7E40D4#7E40D4

#7E40D4 is a mid, highly saturated violet. Relative luminance 0.129; OKLCH L 53.0% C 0.214 H 297.8°. Best body text is #FFFFFF at 5.88:1 contrast (WCAG AA passes).

Color values

HEX#7E40D4
RGBrgb(126, 64, 212)
HSLhsl(265, 63%, 54%)
HSVhsv(265, 70%, 83%)
CMYKcmyk(40.6%, 69.8%, 0%, 16.9%)
CIE-LABlab(42.54, 56.12, -66.23)
CIE-LCHlch(42.54, 86.81, 310.28°)
OKLaboklab(52.96% 0.0996 -0.1892)
OKLCHoklch(52.96% 0.214 297.8)
XYZxyz(22.3182, 12.8555, 63.5801)
Luminance0.1286 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40D4 #96D440
analogous
#404CD4 #7E40D4 #C840D4
triadic
#7E40D4 #D47E40 #40D47E
tetradic
#7E40D4 #D4404C #96D440 #40D4C8
square
#7E40D4 #D4404C #96D440 #40D4C8
split-complementary
#7E40D4 #D4C840 #4CD440
monochromatic
#451C7D #6027AF #7E40D4 #A072DF #C1A4EA

Accessibility & contrast

On white

5.88
#7E40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.57
#7E40D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40D4
5.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40D4#FFFFFF#000000##FFFFFF
##7E40D41.005.883.575.88
#FFFFFF5.881.0021.001.00
#0000003.5721.001.0021.00
##FFFFFF5.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065D8
Deuteranopia (green-blind)
#0063D1
Tritanopia (blue-blind)
#696486
Achromatopsia (no color)
#646464

Design tokens & code

CSS
--color: #7e40d4;
/* rgb */ color: rgb(126, 64, 212);
/* oklch */ color: oklch(53.0% 0.214 297.8);
Tailwind
colors: {
  custom: {
    50: '#aa7ae2',
    500: '#7e40d4',
    950: '#000000',
  },
}
SCSS
$custom: #7e40d4;
$custom-light: #aa7ae2;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40d4",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 265.135,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.52955,
    "c": 0.21381,
    "h": 297.8
  },
  "luminance": 0.12856
}

Semantic roles & 50–950 ramp

primary
#7E40D4
secondary
#BDD798
accent
#E642A1
background
#FBF7FE
surface
#F6EEFC
border
#D0C9D5
text
#110915
muted
#807B84

Preview Lab

Preview with #7E40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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