#7F40AC#7F40AC

#7F40AC is a mid, vivid violet. Relative luminance 0.112; OKLCH L 50.2% C 0.170 H 308.3°. Best body text is #FFFFFF at 6.50:1 contrast (WCAG AA passes).

Color values

HEX#7F40AC
RGBrgb(127, 64, 172)
HSLhsl(275, 46%, 46%)
HSVhsv(275, 63%, 67%)
CMYKcmyk(26.2%, 62.8%, 0%, 32.5%)
CIE-LABlab(39.84, 46.59, -47.22)
CIE-LCHlch(39.84, 66.34, 314.61°)
OKLaboklab(50.15% 0.1054 -0.1333)
OKLCHoklch(50.15% 0.17 308.3)
XYZxyz(18.0307, 11.1576, 40.2255)
Luminance0.1116 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40AC #6DAC40
analogous
#4940AC #7F40AC #AC40A3
triadic
#7F40AC #AC7F40 #40AC7F
tetradic
#7F40AC #AC4940 #6DAC40 #40A3AC
square
#7F40AC #AC4940 #6DAC40 #40A3AC
split-complementary
#7F40AC #A3AC40 #40AC49
monochromatic
#3D1F53 #5E2F7F #7F40AC #9D64C5 #B991D6

Accessibility & contrast

On white

6.50
#7F40AC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.23
#7F40AC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40AC
6.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40AC#FFFFFF#000000##FFFFFF
##7F40AC1.006.503.236.50
#FFFFFF6.501.0021.001.00
#0000003.2321.001.0021.00
##FFFFFF6.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#065BAF
Deuteranopia (green-blind)
#2F5FAA
Tritanopia (blue-blind)
#785670
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #7f40ac;
/* rgb */ color: rgb(127, 64, 172);
/* oklch */ color: oklch(50.2% 0.170 308.3);
Tailwind
colors: {
  custom: {
    50: '#a778c5',
    500: '#7f40ac',
    950: '#000000',
  },
}
SCSS
$custom: #7f40ac;
$custom-light: #a778c5;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40ac",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 172
  },
  "hsl": {
    "h": 275,
    "s": 45.763,
    "l": 46.275
  },
  "oklch": {
    "l": 0.50151,
    "c": 0.16993,
    "h": 308.3
  },
  "luminance": 0.11157
}

Semantic roles & 50–950 ramp

primary
#7F40AC
secondary
#9FC187
accent
#D55289
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#100913
muted
#7F7B82

Preview Lab

Preview with #7F40AC

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

Preview Lab → · Contrast checker → · Palette generator →

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