#7F40D4#7F40D4

#7F40D4 is a mid, highly saturated violet. Relative luminance 0.129; OKLCH L 53.1% C 0.214 H 298.2°. Best body text is #FFFFFF at 5.86:1 contrast (WCAG AA passes).

Color values

HEX#7F40D4
RGBrgb(127, 64, 212)
HSLhsl(266, 63%, 54%)
HSVhsv(266, 70%, 83%)
CMYKcmyk(40.1%, 69.8%, 0%, 16.9%)
CIE-LABlab(42.66, 56.30, -66.03)
CIE-LCHlch(42.66, 86.78, 310.45°)
OKLaboklab(53.06% 0.101 -0.1886)
OKLCHoklch(53.06% 0.214 298.2)
XYZxyz(22.4664, 12.9319, 63.5870)
Luminance0.1293 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40D4 #95D440
analogous
#404BD4 #7F40D4 #C940D4
triadic
#7F40D4 #D47F40 #40D47F
tetradic
#7F40D4 #D4404B #95D440 #40D4C9
square
#7F40D4 #D4404B #95D440 #40D4C9
split-complementary
#7F40D4 #D4C940 #4BD440
monochromatic
#461C7D #6127AF #7F40D4 #A072DF #C2A4EA

Accessibility & contrast

On white

5.86
#7F40D4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.59
#7F40D4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40D4
5.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40D4#FFFFFF#000000##FFFFFF
##7F40D41.005.863.595.86
#FFFFFF5.861.0021.001.00
#0000003.5921.001.0021.00
##FFFFFF5.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0065D8
Deuteranopia (green-blind)
#0063D1
Tritanopia (blue-blind)
#6A6486
Achromatopsia (no color)
#656565

Design tokens & code

CSS
--color: #7f40d4;
/* rgb */ color: rgb(127, 64, 212);
/* oklch */ color: oklch(53.1% 0.214 298.2);
Tailwind
colors: {
  custom: {
    50: '#ab7ae2',
    500: '#7f40d4',
    950: '#000000',
  },
}
SCSS
$custom: #7f40d4;
$custom-light: #ab7ae2;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40d4",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 212
  },
  "hsl": {
    "h": 265.541,
    "s": 63.248,
    "l": 54.118
  },
  "oklch": {
    "l": 0.53063,
    "c": 0.21393,
    "h": 298.2
  },
  "luminance": 0.12932
}

Semantic roles & 50–950 ramp

primary
#7F40D4
secondary
#BDD798
accent
#E642A0
background
#FBF7FE
surface
#F6EEFC
border
#D0C9D5
text
#110915
muted
#807B84

Preview Lab

Preview with #7F40D4

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

Preview Lab → · Contrast checker → · Palette generator →

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