#7E40BA#7E40BA

#7E40BA is a mid, vivid violet. Relative luminance 0.116; OKLCH L 51.0% C 0.185 H 303.8°. Best body text is #FFFFFF at 6.31:1 contrast (WCAG AA passes).

Color values

HEX#7E40BA
RGBrgb(126, 64, 186)
HSLhsl(270, 49%, 49%)
HSVhsv(270, 66%, 73%)
CMYKcmyk(32.3%, 65.6%, 0%, 27.1%)
CIE-LABlab(40.65, 49.69, -54.20)
CIE-LCHlch(40.65, 73.53, 312.52°)
OKLaboklab(51% 0.1032 -0.1538)
OKLCHoklch(51% 0.185 303.8)
XYZxyz(19.2985, 11.6476, 47.6764)
Luminance0.1165 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40BA #7CBA40
analogous
#4140BA #7E40BA #BA40B9
triadic
#7E40BA #BA7E40 #40BA7E
tetradic
#7E40BA #BA4140 #7CBA40 #40B9BA
square
#7E40BA #BA4140 #7CBA40 #40B9BA
split-complementary
#7E40BA #B9BA40 #40BA41
monochromatic
#40215F #5F308C #7E40BA #9C6BCC #BB99DC

Accessibility & contrast

On white

6.31
#7E40BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.33
#7E40BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40BA
6.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40BA#FFFFFF#000000##FFFFFF
##7E40BA1.006.313.336.31
#FFFFFF6.311.0021.001.00
#0000003.3321.001.0021.00
##FFFFFF6.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005EBE
Deuteranopia (green-blind)
#1760B7
Tritanopia (blue-blind)
#735B77
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #7e40ba;
/* rgb */ color: rgb(126, 64, 186);
/* oklch */ color: oklch(51.0% 0.185 303.8);
Tailwind
colors: {
  custom: {
    50: '#a879cf',
    500: '#7e40ba',
    950: '#000000',
  },
}
SCSS
$custom: #7e40ba;
$custom-light: #a879cf;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40ba",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 270.492,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.51003,
    "c": 0.1852,
    "h": 303.8
  },
  "luminance": 0.11648
}

Semantic roles & 50–950 ramp

primary
#7E40BA
secondary
#AAC88E
accent
#D84F93
background
#FAF7FC
surface
#F4EEF9
border
#CEC9D2
text
#100914
muted
#7F7B82

Preview Lab

Preview with #7E40BA

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

Preview Lab → · Contrast checker → · Palette generator →

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