#7F40C0#7F40C0

#7F40C0 is a mid, vivid violet. Relative luminance 0.120; OKLCH L 51.6% C 0.192 H 302.7°. Best body text is #FFFFFF at 6.18:1 contrast (WCAG AA passes).

Color values

HEX#7F40C0
RGBrgb(127, 64, 192)
HSLhsl(270, 50%, 50%)
HSVhsv(270, 67%, 75%)
CMYKcmyk(33.9%, 66.7%, 0%, 24.7%)
CIE-LABlab(41.19, 51.36, -56.83)
CIE-LCHlch(41.19, 76.60, 312.11°)
OKLaboklab(51.55% 0.1039 -0.1615)
OKLCHoklch(51.55% 0.192 302.7)
XYZxyz(20.0980, 11.9846, 51.1134)
Luminance0.1198 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40C0 #81C040
analogous
#4041C0 #7F40C0 #BF40C0
triadic
#7F40C0 #C07F40 #40C07F
tetradic
#7F40C0 #C04041 #81C040 #40C0BF
square
#7F40C0 #C04041 #81C040 #40C0BF
split-complementary
#7F40C0 #C0BF40 #41C040
monochromatic
#422164 #613092 #7F40C0 #9E6ECF #BD9CDE

Accessibility & contrast

On white

6.18
#7F40C0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.40
#7F40C0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40C0
6.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40C0#FFFFFF#000000##FFFFFF
##7F40C01.006.183.406.18
#FFFFFF6.181.0021.001.00
#0000003.4021.001.0021.00
##FFFFFF6.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060C4
Deuteranopia (green-blind)
#0661BD
Tritanopia (blue-blind)
#725D7B
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #7f40c0;
/* rgb */ color: rgb(127, 64, 192);
/* oklch */ color: oklch(51.6% 0.192 302.7);
Tailwind
colors: {
  custom: {
    50: '#a979d4',
    500: '#7f40c0',
    950: '#000000',
  },
}
SCSS
$custom: #7f40c0;
$custom-light: #a979d4;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40c0",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 192
  },
  "hsl": {
    "h": 269.531,
    "s": 50.394,
    "l": 50.196
  },
  "oklch": {
    "l": 0.51552,
    "c": 0.19205,
    "h": 302.7
  },
  "luminance": 0.11985
}

Semantic roles & 50–950 ramp

primary
#7F40C0
secondary
#AECB91
accent
#DA4E95
background
#FAF7FD
surface
#F4EEFA
border
#CEC9D3
text
#100914
muted
#7F7B83

Preview Lab

Preview with #7F40C0

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

Preview Lab → · Contrast checker → · Palette generator →

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