#7F31CA#7F31CA

#7F31CA is a mid, highly saturated violet. Relative luminance 0.110; OKLCH L 50.6% C 0.220 H 302.1°. Best body text is #FFFFFF at 6.57:1 contrast (WCAG AA passes).

Color values

HEX#7F31CA
RGBrgb(127, 49, 202)
HSLhsl(271, 61%, 49%)
HSVhsv(271, 76%, 79%)
CMYKcmyk(37.1%, 75.7%, 0%, 20.8%)
CIE-LABlab(39.53, 60.52, -65.35)
CIE-LCHlch(39.53, 89.07, 312.80°)
OKLaboklab(50.61% 0.1168 -0.1865)
OKLCHoklch(50.61% 0.22 302.1)
XYZxyz(20.5088, 10.9728, 56.9032)
Luminance0.1097 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F31CA #7CCA31
analogous
#3231CA #7F31CA #CA31C9
triadic
#7F31CA #CA7F31 #31CA7F
tetradic
#7F31CA #CA3231 #7CCA31 #31C9CA
square
#7F31CA #CA3231 #7CCA31 #31C9CA
split-complementary
#7F31CA #C9CA31 #31CA32
monochromatic
#411967 #602599 #7F31CA #9D60D8 #BC91E4

Accessibility & contrast

On white

6.57
#7F31CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.19
#7F31CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #7F31CA
6.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F31CA#FFFFFF#000000##FFFFFF
##7F31CA1.006.573.196.57
#FFFFFF6.571.0021.001.00
#0000003.1921.001.0021.00
##FFFFFF6.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CCE
Deuteranopia (green-blind)
#005CC7
Tritanopia (blue-blind)
#6F597C
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #7f31ca;
/* rgb */ color: rgb(127, 49, 202);
/* oklch */ color: oklch(50.6% 0.220 302.1);
Tailwind
colors: {
  custom: {
    50: '#ab71db',
    500: '#7f31ca',
    950: '#000000',
  },
}
SCSS
$custom: #7f31ca;
$custom-light: #ab71db;
$custom-dark: #000000;
JSON
{
  "hex": "#7f31ca",
  "rgb": {
    "r": 127,
    "g": 49,
    "b": 202
  },
  "hsl": {
    "h": 270.588,
    "s": 60.956,
    "l": 49.216
  },
  "oklch": {
    "l": 0.50611,
    "c": 0.22004,
    "h": 302.1
  },
  "luminance": 0.10973
}

Semantic roles & 50–950 ramp

primary
#7F31CA
secondary
#ABCF88
accent
#E44492
background
#FBF7FD
surface
#F6EDFB
border
#D0C8D4
text
#110815
muted
#807B83

Preview Lab

Preview with #7F31CA

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

Preview Lab → · Contrast checker → · Palette generator →

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