#7F40C2#7F40C2

#7F40C2 is a mid, vivid violet. Relative luminance 0.121; OKLCH L 51.7% C 0.194 H 302.3°. Best body text is #FFFFFF at 6.15:1 contrast (WCAG AA passes).

Color values

HEX#7F40C2
RGBrgb(127, 64, 194)
HSLhsl(269, 52%, 51%)
HSVhsv(269, 67%, 76%)
CMYKcmyk(34.5%, 67%, 0%, 23.9%)
CIE-LABlab(41.33, 51.85, -57.77)
CIE-LCHlch(41.33, 77.63, 311.91°)
OKLaboklab(51.7% 0.1037 -0.1643)
OKLCHoklch(51.7% 0.194 302.3)
XYZxyz(20.3211, 12.0738, 52.2884)
Luminance0.1207 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40C2 #83C240
analogous
#4042C2 #7F40C2 #C040C2
triadic
#7F40C2 #C27F40 #40C27F
tetradic
#7F40C2 #C24042 #83C240 #40C2C0
square
#7F40C2 #C24042 #83C240 #40C2C0
split-complementary
#7F40C2 #C2C040 #42C240
monochromatic
#432167 #613095 #7F40C2 #9E6ED1 #BD9DE0

Accessibility & contrast

On white

6.15
#7F40C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.41
#7F40C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40C2
6.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40C2#FFFFFF#000000##FFFFFF
##7F40C21.006.153.416.15
#FFFFFF6.151.0021.001.00
#0000003.4121.001.0021.00
##FFFFFF6.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C6
Deuteranopia (green-blind)
#0061BF
Tritanopia (blue-blind)
#715E7C
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7f40c2;
/* rgb */ color: rgb(127, 64, 194);
/* oklch */ color: oklch(51.7% 0.194 302.3);
Tailwind
colors: {
  custom: {
    50: '#a979d5',
    500: '#7f40c2',
    950: '#000000',
  },
}
SCSS
$custom: #7f40c2;
$custom-light: #a979d5;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40c2",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 269.077,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.51698,
    "c": 0.19425,
    "h": 302.3
  },
  "luminance": 0.12074
}

Semantic roles & 50–950 ramp

primary
#7F40C2
secondary
#B0CC92
accent
#DB4D96
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7F40C2

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

Preview Lab → · Contrast checker → · Palette generator →

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