#7F40C6#7F40C6

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

Color values

HEX#7F40C6
RGBrgb(127, 64, 198)
HSLhsl(268, 54%, 51%)
HSVhsv(268, 68%, 78%)
CMYKcmyk(35.9%, 67.7%, 0%, 22.4%)
CIE-LABlab(41.62, 52.83, -59.63)
CIE-LCHlch(41.62, 79.67, 311.54°)
OKLaboklab(51.99% 0.1032 -0.1698)
OKLCHoklch(51.99% 0.199 301.3)
XYZxyz(20.7764, 12.2559, 54.6862)
Luminance0.1226 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40C6 #87C640
analogous
#4044C6 #7F40C6 #C240C6
triadic
#7F40C6 #C67F40 #40C67F
tetradic
#7F40C6 #C64044 #87C640 #40C6C2
square
#7F40C6 #C64044 #87C640 #40C6C2
split-complementary
#7F40C6 #C6C240 #44C640
monochromatic
#44206C #612E9B #7F40C6 #9F6FD4 #BE9EE2

Accessibility & contrast

On white

6.08
#7F40C6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.45
#7F40C6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40C6
6.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40C6#FFFFFF#000000##FFFFFF
##7F40C61.006.083.456.08
#FFFFFF6.081.0021.001.00
#0000003.4521.001.0021.00
##FFFFFF6.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061CA
Deuteranopia (green-blind)
#0061C3
Tritanopia (blue-blind)
#705F7E
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7f40c6;
/* rgb */ color: rgb(127, 64, 198);
/* oklch */ color: oklch(52.0% 0.199 301.3);
Tailwind
colors: {
  custom: {
    50: '#a979d8',
    500: '#7f40c6',
    950: '#000000',
  },
}
SCSS
$custom: #7f40c6;
$custom-light: #a979d8;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40c6",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 198
  },
  "hsl": {
    "h": 268.209,
    "s": 54.032,
    "l": 51.373
  },
  "oklch": {
    "l": 0.51994,
    "c": 0.19865,
    "h": 301.3
  },
  "luminance": 0.12256
}

Semantic roles & 50–950 ramp

primary
#7F40C6
secondary
#B3CE93
accent
#DD4A98
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100915
muted
#7F7B83

Preview Lab

Preview with #7F40C6

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

Preview Lab → · Contrast checker → · Palette generator →

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