#7E40A3#7E40A3

#7E40A3 is a mid, vivid violet. Relative luminance 0.107; OKLCH L 49.4% C 0.160 H 310.8°. Best body text is #FFFFFF at 6.67:1 contrast (WCAG AA passes).

Color values

HEX#7E40A3
RGBrgb(126, 64, 163)
HSLhsl(278, 44%, 45%)
HSVhsv(278, 61%, 64%)
CMYKcmyk(22.7%, 60.7%, 0%, 36.1%)
CIE-LABlab(39.15, 44.25, -42.98)
CIE-LCHlch(39.15, 61.69, 315.84°)
OKLaboklab(49.44% 0.1042 -0.1209)
OKLCHoklch(49.44% 0.16 310.8)
XYZxyz(17.0472, 10.7471, 35.8196)
Luminance0.1075 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E40A3 #65A340
analogous
#4D40A3 #7E40A3 #A34096
triadic
#7E40A3 #A37E40 #40A37E
tetradic
#7E40A3 #A34D40 #65A340 #4096A3
square
#7E40A3 #A34D40 #65A340 #4096A3
split-complementary
#7E40A3 #96A340 #40A34D
monochromatic
#3A1D4B #5C2F77 #7E40A3 #9C60C0 #B88CD2

Accessibility & contrast

On white

6.67
#7E40A3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.15
#7E40A3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E40A3
6.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E40A3#FFFFFF#000000##FFFFFF
##7E40A31.006.673.156.67
#FFFFFF6.671.0021.001.00
#0000003.1521.001.0021.00
##FFFFFF6.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1B59A6
Deuteranopia (green-blind)
#365DA1
Tritanopia (blue-blind)
#79526B
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #7e40a3;
/* rgb */ color: rgb(126, 64, 163);
/* oklch */ color: oklch(49.4% 0.160 310.8);
Tailwind
colors: {
  custom: {
    50: '#a678bf',
    500: '#7e40a3',
    950: '#000000',
  },
}
SCSS
$custom: #7e40a3;
$custom-light: #a678bf;
$custom-dark: #000000;
JSON
{
  "hex": "#7e40a3",
  "rgb": {
    "r": 126,
    "g": 64,
    "b": 163
  },
  "hsl": {
    "h": 277.576,
    "s": 43.612,
    "l": 44.51
  },
  "oklch": {
    "l": 0.49439,
    "c": 0.15962,
    "h": 310.8
  },
  "luminance": 0.10747
}

Semantic roles & 50–950 ramp

primary
#7E40A3
secondary
#98BD82
accent
#D35484
background
#FAF7FB
surface
#F4EDF7
border
#CEC8D0
text
#100912
muted
#7F7B81

Preview Lab

Preview with #7E40A3

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

Preview Lab → · Contrast checker → · Palette generator →

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