#7F42C4#7F42C4

#7F42C4 is a mid, vivid violet. Relative luminance 0.124; OKLCH L 52.1% C 0.194 H 301.5°. Best body text is #FFFFFF at 6.04:1 contrast (WCAG AA passes).

Color values

HEX#7F42C4
RGBrgb(127, 66, 196)
HSLhsl(268, 52%, 51%)
HSVhsv(268, 66%, 77%)
CMYKcmyk(35.2%, 66.3%, 0%, 23.1%)
CIE-LABlab(41.84, 51.35, -58.12)
CIE-LCHlch(41.84, 77.56, 311.46°)
OKLaboklab(52.1% 0.1013 -0.1653)
OKLCHoklch(52.1% 0.194 301.5)
XYZxyz(20.6620, 12.3939, 53.5176)
Luminance0.1239 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F42C4 #87C442
analogous
#4246C4 #7F42C4 #C042C4
triadic
#7F42C4 #C47F42 #42C47F
tetradic
#7F42C4 #C44246 #87C442 #42C4C0
square
#7F42C4 #C44246 #87C442 #42C4C0
split-complementary
#7F42C4 #C4C042 #46C442
monochromatic
#44216A #613099 #7F42C4 #9F71D3 #BE9FE1

Accessibility & contrast

On white

6.04
#7F42C4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.48
#7F42C4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F42C4
6.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F42C4#FFFFFF#000000##FFFFFF
##7F42C41.006.043.486.04
#FFFFFF6.041.0021.001.00
#0000003.4821.001.0021.00
##FFFFFF6.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062C8
Deuteranopia (green-blind)
#0062C1
Tritanopia (blue-blind)
#715F7D
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #7f42c4;
/* rgb */ color: rgb(127, 66, 196);
/* oklch */ color: oklch(52.1% 0.194 301.5);
Tailwind
colors: {
  custom: {
    50: '#a97ad7',
    500: '#7f42c4',
    950: '#000000',
  },
}
SCSS
$custom: #7f42c4;
$custom-light: #a97ad7;
$custom-dark: #000000;
JSON
{
  "hex": "#7f42c4",
  "rgb": {
    "r": 127,
    "g": 66,
    "b": 196
  },
  "hsl": {
    "h": 268.154,
    "s": 52.419,
    "l": 51.373
  },
  "oklch": {
    "l": 0.52103,
    "c": 0.19386,
    "h": 301.5
  },
  "luminance": 0.12394
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #7F42C4

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

Preview Lab → · Contrast checker → · Palette generator →

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