#7F40BA#7F40BA

#7F40BA is a mid, vivid violet. Relative luminance 0.117; OKLCH L 51.1% C 0.185 H 304.3°. Best body text is #FFFFFF at 6.28:1 contrast (WCAG AA passes).

Color values

HEX#7F40BA
RGBrgb(127, 64, 186)
HSLhsl(271, 49%, 49%)
HSVhsv(271, 66%, 73%)
CMYKcmyk(31.7%, 65.6%, 0%, 27.1%)
CIE-LABlab(40.77, 49.91, -53.99)
CIE-LCHlch(40.77, 73.53, 312.75°)
OKLaboklab(51.12% 0.1045 -0.1532)
OKLCHoklch(51.12% 0.185 304.3)
XYZxyz(19.4467, 11.7241, 47.6833)
Luminance0.1172 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F40BA #7BBA40
analogous
#4240BA #7F40BA #BA40B8
triadic
#7F40BA #BA7F40 #40BA7F
tetradic
#7F40BA #BA4240 #7BBA40 #40B8BA
square
#7F40BA #BA4240 #7BBA40 #40B8BA
split-complementary
#7F40BA #B8BA40 #40BA42
monochromatic
#41215F #60308C #7F40BA #9D6BCC #BB99DC

Accessibility & contrast

On white

6.28
#7F40BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.34
#7F40BA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F40BA
6.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F40BA#FFFFFF#000000##FFFFFF
##7F40BA1.006.283.346.28
#FFFFFF6.281.0021.001.00
#0000003.3421.001.0021.00
##FFFFFF6.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FBE
Deuteranopia (green-blind)
#1A60B7
Tritanopia (blue-blind)
#745B77
Achromatopsia (no color)
#606060

Design tokens & code

CSS
--color: #7f40ba;
/* rgb */ color: rgb(127, 64, 186);
/* oklch */ color: oklch(51.1% 0.185 304.3);
Tailwind
colors: {
  custom: {
    50: '#a879cf',
    500: '#7f40ba',
    950: '#000000',
  },
}
SCSS
$custom: #7f40ba;
$custom-light: #a879cf;
$custom-dark: #000000;
JSON
{
  "hex": "#7f40ba",
  "rgb": {
    "r": 127,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 270.984,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.51119,
    "c": 0.18543,
    "h": 304.3
  },
  "luminance": 0.11724
}

Semantic roles & 50–950 ramp

primary
#7F40BA
secondary
#AAC88E
accent
#D84F92
background
#FAF7FC
surface
#F4EEF9
border
#CEC9D2
text
#100914
muted
#7F7B82

Preview Lab

Preview with #7F40BA

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

Preview Lab → · Contrast checker → · Palette generator →

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