#7E40B2#7E40B2

#7E40B2 is a mid, vivid violet. Relative luminance 0.113; OKLCH L 50.4% C 0.176 H 306.1°. Best body text is #FFFFFF at 6.44:1 contrast (WCAG AA passes).

Color values

HEX#7E40B2
RGBrgb(126, 64, 178)
HSLhsl(273, 47%, 47%)
HSVhsv(273, 64%, 70%)
CMYKcmyk(29.2%, 64%, 0%, 30.2%)
CIE-LABlab(40.11, 47.77, -50.36)
CIE-LCHlch(40.11, 69.41, 313.49°)
OKLaboklab(50.44% 0.1038 -0.1425)
OKLCHoklch(50.44% 0.176 306.1)
XYZxyz(18.4717, 11.3169, 43.3221)
Luminance0.1132 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40B2 #74B240
analogous
#4540B2 #7E40B2 #B240AD
triadic
#7E40B2 #B27E40 #40B27E
tetradic
#7E40B2 #B24540 #74B240 #40ADB2
square
#7E40B2 #B24540 #74B240 #40ADB2
split-complementary
#7E40B2 #ADB240 #40B245
monochromatic
#3E2058 #5E3085 #7E40B2 #9C67C8 #B994D8

Accessibility & contrast

On white

6.44
#7E40B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.26
#7E40B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40B2
6.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40B2#FFFFFF#000000##FFFFFF
##7E40B21.006.443.266.44
#FFFFFF6.441.0021.001.00
#0000003.2621.001.0021.00
##FFFFFF6.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DB6
Deuteranopia (green-blind)
#265FAF
Tritanopia (blue-blind)
#755873
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #7e40b2;
/* rgb */ color: rgb(126, 64, 178);
/* oklch */ color: oklch(50.4% 0.176 306.1);
Tailwind
colors: {
  custom: {
    50: '#a779ca',
    500: '#7e40b2',
    950: '#000000',
  },
}
SCSS
$custom: #7e40b2;
$custom-light: #a779ca;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40b2",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 272.632,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.5044,
    "c": 0.17631,
    "h": 306.1
  },
  "luminance": 0.11317
}

Semantic roles & 50–950 ramp

primary
#7E40B2
secondary
#A4C48A
accent
#D7518E
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#100913
muted
#7F7B82

Preview Lab

Preview with #7E40B2

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

Preview Lab → · Contrast checker → · Palette generator →

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