#7E40B3#7E40B3

#7E40B3 is a mid, vivid violet. Relative luminance 0.114; OKLCH L 50.5% C 0.177 H 305.8°. Best body text is #FFFFFF at 6.42:1 contrast (WCAG AA passes).

Color values

HEX#7E40B3
RGBrgb(126, 64, 179)
HSLhsl(272, 47%, 48%)
HSVhsv(272, 64%, 70%)
CMYKcmyk(29.6%, 64.2%, 0%, 29.8%)
CIE-LABlab(40.18, 48.01, -50.84)
CIE-LCHlch(40.18, 69.93, 313.36°)
OKLaboklab(50.51% 0.1037 -0.144)
OKLCHoklch(50.51% 0.177 305.8)
XYZxyz(18.5725, 11.3572, 43.8528)
Luminance0.1136 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40B3 #75B340
analogous
#4540B3 #7E40B3 #B340AE
triadic
#7E40B3 #B37E40 #40B37E
tetradic
#7E40B3 #B34540 #75B340 #40AEB3
square
#7E40B3 #B34540 #75B340 #40AEB3
split-complementary
#7E40B3 #AEB340 #40B345
monochromatic
#3F2059 #5E3086 #7E40B3 #9C67C9 #B994D9

Accessibility & contrast

On white

6.42
#7E40B3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.27
#7E40B3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40B3
6.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40B3#FFFFFF#000000##FFFFFF
##7E40B31.006.423.276.42
#FFFFFF6.421.0021.001.00
#0000003.2721.001.0021.00
##FFFFFF6.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DB7
Deuteranopia (green-blind)
#245FB0
Tritanopia (blue-blind)
#755874
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #7e40b3;
/* rgb */ color: rgb(126, 64, 179);
/* oklch */ color: oklch(50.5% 0.177 305.8);
Tailwind
colors: {
  custom: {
    50: '#a779ca',
    500: '#7e40b3',
    950: '#000000',
  },
}
SCSS
$custom: #7e40b3;
$custom-light: #a779ca;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40b3",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 179
  },
  "hsl": {
    "h": 272.348,
    "s": 47.325,
    "l": 47.647
  },
  "oklch": {
    "l": 0.5051,
    "c": 0.17742,
    "h": 305.8
  },
  "luminance": 0.11357
}

Semantic roles & 50–950 ramp

primary
#7E40B3
secondary
#A5C48A
accent
#D7518F
background
#FAF7FC
surface
#F4EEF8
border
#CEC9D1
text
#100913
muted
#7F7B82

Preview Lab

Preview with #7E40B3

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

Preview Lab → · Contrast checker → · Palette generator →

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