#7F40D3#7F40D3

#7F40D3 is a mid, highly saturated violet. Relative luminance 0.129; OKLCH L 53.0% C 0.213 H 298.4°. Best body text is #FFFFFF at 5.87:1 contrast (WCAG AA passes).

Color values

HEX#7F40D3
RGBrgb(127, 64, 211)
HSLhsl(266, 63%, 54%)
HSVhsv(266, 70%, 83%)
CMYKcmyk(39.8%, 69.7%, 0%, 17.3%)
CIE-LABlab(42.58, 56.05, -65.58)
CIE-LCHlch(42.58, 86.27, 310.52°)
OKLaboklab(52.99% 0.1012 -0.1872)
OKLCHoklch(52.99% 0.213 298.4)
XYZxyz(22.3407, 12.8816, 62.9248)
Luminance0.1288 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40D3 #94D340
analogous
#404BD3 #7F40D3 #C840D3
triadic
#7F40D3 #D37F40 #40D37F
tetradic
#7F40D3 #D3404B #94D340 #40D3C8
square
#7F40D3 #D3404B #94D340 #40D3C8
split-complementary
#7F40D3 #D3C840 #4BD340
monochromatic
#451D7C #6128AE #7F40D3 #A072DE #C2A3EA

Accessibility & contrast

On white

5.87
#7F40D3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.58
#7F40D3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40D3
5.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40D3#FFFFFF#000000##FFFFFF
##7F40D31.005.873.585.87
#FFFFFF5.871.0021.001.00
#0000003.5821.001.0021.00
##FFFFFF5.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065D7
Deuteranopia (green-blind)
#0063D0
Tritanopia (blue-blind)
#6B6485
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #7f40d3;
/* rgb */ color: rgb(127, 64, 211);
/* oklch */ color: oklch(53.0% 0.213 298.4);
Tailwind
colors: {
  custom: {
    50: '#ab7ae1',
    500: '#7f40d3',
    950: '#000000',
  },
}
SCSS
$custom: #7f40d3;
$custom-light: #ab7ae1;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40d3",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 211
  },
  "hsl": {
    "h": 265.714,
    "s": 62.553,
    "l": 53.922
  },
  "oklch": {
    "l": 0.52985,
    "c": 0.21284,
    "h": 298.4
  },
  "luminance": 0.12882
}

Semantic roles & 50–950 ramp

primary
#7F40D3
secondary
#BCD798
accent
#E642A0
background
#FBF7FD
surface
#F6EEFB
border
#D0C9D4
text
#110915
muted
#807B83

Preview Lab

Preview with #7F40D3

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

Preview Lab → · Contrast checker → · Palette generator →

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