#7F31A2#7F31A2

#7F31A2 is a mid, vivid purple. Relative luminance 0.093; OKLCH L 47.6% C 0.180 H 313.3°. Best body text is #FFFFFF at 7.33:1 contrast (WCAG AA passes).

Color values

HEX#7F31A2
RGBrgb(127, 49, 162)
HSLhsl(281, 54%, 41%)
HSVhsv(281, 70%, 64%)
CMYKcmyk(21.6%, 69.8%, 0%, 36.5%)
CIE-LABlab(36.59, 51.52, -46.48)
CIE-LCHlch(36.59, 69.39, 317.94°)
OKLaboklab(47.6% 0.1237 -0.131)
OKLCHoklch(47.6% 0.18 313.3)
XYZxyz(16.3712, 9.3178, 35.1115)
Luminance0.0932 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F31A2 #54A231
analogous
#4731A2 #7F31A2 #A2318D
triadic
#7F31A2 #A27F31 #31A27F
tetradic
#7F31A2 #A24731 #54A231 #318DA2
square
#7F31A2 #A24731 #54A231 #318DA2
split-complementary
#7F31A2 #8DA231 #31A247
monochromatic
#351544 #5A2373 #7F31A2 #A048C8 #B977D6

Accessibility & contrast

On white

7.33
#7F31A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.86
#7F31A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #7F31A2
7.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F31A2#FFFFFF#000000##FFFFFF
##7F31A21.007.332.867.33
#FFFFFF7.331.0021.001.00
#0000002.8621.001.0021.00
##FFFFFF7.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052A5
Deuteranopia (green-blind)
#29589F
Tritanopia (blue-blind)
#7B4866
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #7f31a2;
/* rgb */ color: rgb(127, 49, 162);
/* oklch */ color: oklch(47.6% 0.180 313.3);
Tailwind
colors: {
  custom: {
    50: '#a870be',
    500: '#7f31a2',
    950: '#000000',
  },
}
SCSS
$custom: #7f31a2;
$custom-light: #a870be;
$custom-dark: #000000;
JSON
{
  "hex": "#7f31a2",
  "rgb": {
    "r": 127,
    "g": 49,
    "b": 162
  },
  "hsl": {
    "h": 281.416,
    "s": 53.555,
    "l": 41.373
  },
  "oklch": {
    "l": 0.47598,
    "c": 0.18016,
    "h": 313.3
  },
  "luminance": 0.09317
}

Semantic roles & 50–950 ramp

primary
#7F31A2
secondary
#89BE71
accent
#DD4B78
background
#FAF7FB
surface
#F4EDF7
border
#CEC8D0
text
#100812
muted
#7F7B81

Preview Lab

Preview with #7F31A2

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

Preview Lab → · Contrast checker → · Palette generator →

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