#7F40C5#7F40C5

#7F40C5 is a mid, vivid violet. Relative luminance 0.122; OKLCH L 51.9% C 0.198 H 301.5°. Best body text is #FFFFFF at 6.10:1 contrast (WCAG AA passes).

Color values

HEX#7F40C5
RGBrgb(127, 64, 197)
HSLhsl(268, 53%, 51%)
HSVhsv(268, 68%, 77%)
CMYKcmyk(35.5%, 67.5%, 0%, 22.7%)
CIE-LABlab(41.55, 52.59, -59.17)
CIE-LCHlch(41.55, 79.16, 311.63°)
OKLaboklab(51.92% 0.1033 -0.1684)
OKLCHoklch(51.92% 0.198 301.5)
XYZxyz(20.6614, 12.2099, 54.0807)
Luminance0.1221 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40C5 #86C540
analogous
#4043C5 #7F40C5 #C140C5
triadic
#7F40C5 #C57F40 #40C57F
tetradic
#7F40C5 #C54043 #86C540 #40C5C1
square
#7F40C5 #C54043 #86C540 #40C5C1
split-complementary
#7F40C5 #C5C140 #43C540
monochromatic
#43206A #612F99 #7F40C5 #9E6FD3 #BE9EE2

Accessibility & contrast

On white

6.10
#7F40C5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.44
#7F40C5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40C5
6.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40C5#FFFFFF#000000##FFFFFF
##7F40C51.006.103.446.10
#FFFFFF6.101.0021.001.00
#0000003.4421.001.0021.00
##FFFFFF6.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061C9
Deuteranopia (green-blind)
#0061C2
Tritanopia (blue-blind)
#705F7D
Achromatopsia (no color)
#626262

Design tokens & code

CSS
--color: #7f40c5;
/* rgb */ color: rgb(127, 64, 197);
/* oklch */ color: oklch(51.9% 0.198 301.5);
Tailwind
colors: {
  custom: {
    50: '#a979d7',
    500: '#7f40c5',
    950: '#000000',
  },
}
SCSS
$custom: #7f40c5;
$custom-light: #a979d7;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40c5",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 197
  },
  "hsl": {
    "h": 268.421,
    "s": 53.414,
    "l": 51.176
  },
  "oklch": {
    "l": 0.5192,
    "c": 0.19754,
    "h": 301.5
  },
  "luminance": 0.1221
}

Semantic roles & 50–950 ramp

primary
#7F40C5
secondary
#B2CE93
accent
#DD4B98
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7F40C5

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

Preview Lab → · Contrast checker → · Palette generator →

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