#7E40BC#7E40BC

#7E40BC is a mid, vivid violet. Relative luminance 0.117; OKLCH L 51.1% C 0.187 H 303.3°. Best body text is #FFFFFF at 6.28:1 contrast (WCAG AA passes).

Color values

HEX#7E40BC
RGBrgb(126, 64, 188)
HSLhsl(270, 49%, 49%)
HSVhsv(270, 66%, 74%)
CMYKcmyk(33%, 66%, 0%, 26.3%)
CIE-LABlab(40.79, 50.18, -55.15)
CIE-LCHlch(40.79, 74.56, 312.30°)
OKLaboklab(51.15% 0.103 -0.1566)
OKLCHoklch(51.15% 0.187 303.3)
XYZxyz(19.5126, 11.7333, 48.8040)
Luminance0.1173 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40BC #7EBC40
analogous
#4040BC #7E40BC #BC40BC
triadic
#7E40BC #BC7E40 #40BC7E
tetradic
#7E40BC #BC4040 #7EBC40 #40BCBC
square
#7E40BC #BC4040 #7EBC40 #40BCBC
split-complementary
#7E40BC #BCBC40 #40BC40
monochromatic
#412161 #5F308E #7E40BC #9D6CCD #BB9ADD

Accessibility & contrast

On white

6.28
#7E40BC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.35
#7E40BC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40BC
6.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40BC#FFFFFF#000000##FFFFFF
##7E40BC1.006.283.356.28
#FFFFFF6.281.0021.001.00
#0000003.3521.001.0021.00
##FFFFFF6.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FC0
Deuteranopia (green-blind)
#1260B9
Tritanopia (blue-blind)
#725B78
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #7e40bc;
/* rgb */ color: rgb(126, 64, 188);
/* oklch */ color: oklch(51.1% 0.187 303.3);
Tailwind
colors: {
  custom: {
    50: '#a879d1',
    500: '#7e40bc',
    950: '#000000',
  },
}
SCSS
$custom: #7e40bc;
$custom-light: #a879d1;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40bc",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 188
  },
  "hsl": {
    "h": 270,
    "s": 49.206,
    "l": 49.412
  },
  "oklch": {
    "l": 0.51147,
    "c": 0.18742,
    "h": 303.3
  },
  "luminance": 0.11733
}

Semantic roles & 50–950 ramp

primary
#7E40BC
secondary
#ACC98F
accent
#D94F94
background
#FAF7FC
surface
#F4EEF9
border
#CEC9D2
text
#100914
muted
#7F7B82

Preview Lab

Preview with #7E40BC

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

Preview Lab → · Contrast checker → · Palette generator →

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