#7F40D5#7F40D5

#7F40D5 is a mid, highly saturated violet. Relative luminance 0.130; OKLCH L 53.1% C 0.215 H 298.0°. Best body text is #FFFFFF at 5.84:1 contrast (WCAG AA passes).

Color values

HEX#7F40D5
RGBrgb(127, 64, 213)
HSLhsl(265, 64%, 54%)
HSVhsv(265, 70%, 84%)
CMYKcmyk(40.4%, 70%, 0%, 16.5%)
CIE-LABlab(42.74, 56.55, -66.48)
CIE-LCHlch(42.74, 87.28, 310.38°)
OKLaboklab(53.14% 0.1008 -0.1899)
OKLCHoklch(53.14% 0.215 298)
XYZxyz(22.5929, 12.9826, 64.2534)
Luminance0.1298 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40D5 #96D540
analogous
#404CD5 #7F40D5 #C940D5
triadic
#7F40D5 #D57F40 #40D57F
tetradic
#7F40D5 #D5404C #96D540 #40D5C9
square
#7F40D5 #D5404C #96D540 #40D5C9
split-complementary
#7F40D5 #D5C940 #4CD540
monochromatic
#461C7F #6127B1 #7F40D5 #A172E0 #C2A4EB

Accessibility & contrast

On white

5.84
#7F40D5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.60
#7F40D5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40D5
5.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40D5#FFFFFF#000000##FFFFFF
##7F40D51.005.843.605.84
#FFFFFF5.841.0021.001.00
#0000003.6021.001.0021.00
##FFFFFF5.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065D9
Deuteranopia (green-blind)
#0063D2
Tritanopia (blue-blind)
#6A6586
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #7f40d5;
/* rgb */ color: rgb(127, 64, 213);
/* oklch */ color: oklch(53.1% 0.215 298.0);
Tailwind
colors: {
  custom: {
    50: '#ab7ae3',
    500: '#7f40d5',
    950: '#000000',
  },
}
SCSS
$custom: #7f40d5;
$custom-light: #ab7ae3;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40d5",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 213
  },
  "hsl": {
    "h": 265.369,
    "s": 63.948,
    "l": 54.314
  },
  "oklch": {
    "l": 0.53142,
    "c": 0.21501,
    "h": 298
  },
  "luminance": 0.12983
}

Semantic roles & 50–950 ramp

primary
#7F40D5
secondary
#BDD899
accent
#E741A1
background
#FBF7FE
surface
#F6EEFC
border
#D0C9D5
text
#110916
muted
#807B84

Preview Lab

Preview with #7F40D5

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

Preview Lab → · Contrast checker → · Palette generator →

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