#7E42C4#7E42C4

#7E42C4 is a mid, vivid violet. Relative luminance 0.123; OKLCH L 52.0% C 0.194 H 301.0°. Best body text is #FFFFFF at 6.06:1 contrast (WCAG AA passes).

Color values

HEX#7E42C4
RGBrgb(126, 66, 196)
HSLhsl(268, 52%, 51%)
HSVhsv(268, 66%, 77%)
CMYKcmyk(35.7%, 66.3%, 0%, 23.1%)
CIE-LABlab(41.72, 51.14, -58.32)
CIE-LCHlch(41.72, 77.57, 311.25°)
OKLaboklab(51.99% 0.0999 -0.1659)
OKLCHoklch(51.99% 0.194 301)
XYZxyz(20.5138, 12.3175, 53.5106)
Luminance0.1232 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7E42C4 #88C442
analogous
#4247C4 #7E42C4 #BF42C4
triadic
#7E42C4 #C47E42 #42C47E
tetradic
#7E42C4 #C44247 #88C442 #42C4BF
square
#7E42C4 #C44247 #88C442 #42C4BF
split-complementary
#7E42C4 #C4BF42 #47C442
monochromatic
#43216A #603099 #7E42C4 #9E71D3 #BE9FE1

Accessibility & contrast

On white

6.06
#7E42C4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.46
#7E42C4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7E42C4
6.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7E42C4#FFFFFF#000000##FFFFFF
##7E42C41.006.063.466.06
#FFFFFF6.061.0021.001.00
#0000003.4621.001.0021.00
##FFFFFF6.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062C8
Deuteranopia (green-blind)
#0062C1
Tritanopia (blue-blind)
#6F607D
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7e42c4;
/* rgb */ color: rgb(126, 66, 196);
/* oklch */ color: oklch(52.0% 0.194 301.0);
Tailwind
colors: {
  custom: {
    50: '#a87ad7',
    500: '#7e42c4',
    950: '#000000',
  },
}
SCSS
$custom: #7e42c4;
$custom-light: #a87ad7;
$custom-dark: #000000;
JSON
{
  "hex": "#7e42c4",
  "rgb": {
    "r": 126,
    "g": 66,
    "b": 196
  },
  "hsl": {
    "h": 267.692,
    "s": 52.419,
    "l": 51.373
  },
  "oklch": {
    "l": 0.51991,
    "c": 0.19368,
    "h": 301
  },
  "luminance": 0.12318
}

Semantic roles & 50–950 ramp

primary
#7E42C4
secondary
#B3CE94
accent
#DC4C99
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7E42C4

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

Preview Lab → · Contrast checker → · Palette generator →

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