#7F40C1#7F40C1

#7F40C1 is a mid, vivid violet. Relative luminance 0.120; OKLCH L 51.6% C 0.193 H 302.5°. Best body text is #FFFFFF at 6.17:1 contrast (WCAG AA passes).

Color values

HEX#7F40C1
RGBrgb(127, 64, 193)
HSLhsl(269, 51%, 50%)
HSVhsv(269, 67%, 76%)
CMYKcmyk(34.2%, 66.8%, 0%, 24.3%)
CIE-LABlab(41.26, 51.61, -57.30)
CIE-LCHlch(41.26, 77.12, 312.01°)
OKLaboklab(51.63% 0.1038 -0.1629)
OKLCHoklch(51.63% 0.193 302.5)
XYZxyz(20.2092, 12.0290, 51.6989)
Luminance0.1203 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40C1 #82C140
analogous
#4042C1 #7F40C1 #BF40C1
triadic
#7F40C1 #C17F40 #40C17F
tetradic
#7F40C1 #C14042 #82C140 #40C1BF
square
#7F40C1 #C14042 #82C140 #40C1BF
split-complementary
#7F40C1 #C1BF40 #42C140
monochromatic
#432166 #613094 #7F40C1 #9E6ED0 #BD9CDF

Accessibility & contrast

On white

6.17
#7F40C1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.41
#7F40C1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40C1
6.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40C1#FFFFFF#000000##FFFFFF
##7F40C11.006.173.416.17
#FFFFFF6.171.0021.001.00
#0000003.4121.001.0021.00
##FFFFFF6.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C5
Deuteranopia (green-blind)
#0261BE
Tritanopia (blue-blind)
#725D7B
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7f40c1;
/* rgb */ color: rgb(127, 64, 193);
/* oklch */ color: oklch(51.6% 0.193 302.5);
Tailwind
colors: {
  custom: {
    50: '#a979d5',
    500: '#7f40c1',
    950: '#000000',
  },
}
SCSS
$custom: #7f40c1;
$custom-light: #a979d5;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40c1",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 193
  },
  "hsl": {
    "h": 269.302,
    "s": 50.988,
    "l": 50.392
  },
  "oklch": {
    "l": 0.51625,
    "c": 0.19315,
    "h": 302.5
  },
  "luminance": 0.12029
}

Semantic roles & 50–950 ramp

primary
#7F40C1
secondary
#AFCB92
accent
#DA4D96
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7F40C1

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

Preview Lab → · Contrast checker → · Palette generator →

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