#7F42C8#7F42C8

#7F42C8 is a mid, vivid violet. Relative luminance 0.126; OKLCH L 52.4% C 0.198 H 300.5°. Best body text is #FFFFFF at 5.97:1 contrast (WCAG AA passes).

Color values

HEX#7F42C8
RGBrgb(127, 66, 200)
HSLhsl(267, 55%, 52%)
HSVhsv(267, 67%, 78%)
CMYKcmyk(36.5%, 67%, 0%, 21.6%)
CIE-LABlab(42.12, 52.34, -59.98)
CIE-LCHlch(42.12, 79.61, 311.11°)
OKLaboklab(52.4% 0.1008 -0.1708)
OKLCHoklch(52.4% 0.198 300.5)
XYZxyz(21.1234, 12.5784, 55.9474)
Luminance0.1258 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F42C8 #8BC842
analogous
#4248C8 #7F42C8 #C242C8
triadic
#7F42C8 #C87F42 #42C87F
tetradic
#7F42C8 #C84248 #8BC842 #42C8C2
square
#7F42C8 #C84248 #8BC842 #42C8C2
split-complementary
#7F42C8 #C8C242 #48C842
monochromatic
#44206F #612E9F #7F42C8 #9F71D6 #BFA1E4

Accessibility & contrast

On white

5.97
#7F42C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.52
#7F42C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F42C8
5.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F42C8#FFFFFF#000000##FFFFFF
##7F42C81.005.973.525.97
#FFFFFF5.971.0021.001.00
#0000003.5221.001.0021.00
##FFFFFF5.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063CC
Deuteranopia (green-blind)
#0063C5
Tritanopia (blue-blind)
#6F6180
Achromatopsia (no color)
#636363

Design tokens & code

CSS
--color: #7f42c8;
/* rgb */ color: rgb(127, 66, 200);
/* oklch */ color: oklch(52.4% 0.198 300.5);
Tailwind
colors: {
  custom: {
    50: '#a97ada',
    500: '#7f42c8',
    950: '#000000',
  },
}
SCSS
$custom: #7f42c8;
$custom-light: #a97ada;
$custom-dark: #000000;
JSON
{
  "hex": "#7f42c8",
  "rgb": {
    "r": 127,
    "g": 66,
    "b": 200
  },
  "hsl": {
    "h": 267.313,
    "s": 54.918,
    "l": 52.157
  },
  "oklch": {
    "l": 0.52399,
    "c": 0.1983,
    "h": 300.5
  },
  "luminance": 0.12579
}

Semantic roles & 50–950 ramp

primary
#7F42C8
secondary
#B6D096
accent
#DE4A9B
background
#FAF7FD
surface
#F4EEFB
border
#CEC9D4
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7F42C8

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

Preview Lab → · Contrast checker → · Palette generator →

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