#7F31B2#7F31B2

#7F31B2 is a mid, vivid violet. Relative luminance 0.099; OKLCH L 48.7% C 0.196 H 308.3°. Best body text is #FFFFFF at 7.04:1 contrast (WCAG AA passes).

Color values

HEX#7F31B2
RGBrgb(127, 49, 178)
HSLhsl(276, 57%, 45%)
HSVhsv(276, 72%, 70%)
CMYKcmyk(28.7%, 72.5%, 0%, 30.2%)
CIE-LABlab(37.70, 55.03, -54.24)
CIE-LCHlch(37.70, 77.27, 315.42°)
OKLaboklab(48.75% 0.1216 -0.1538)
OKLCHoklch(48.75% 0.196 308.3)
XYZxyz(17.8849, 9.9233, 43.0841)
Luminance0.0992 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#7F31B2 #64B231
analogous
#3F31B2 #7F31B2 #B231A5
triadic
#7F31B2 #B27F31 #31B27F
tetradic
#7F31B2 #B23F31 #64B231 #31A5B2
square
#7F31B2 #B23F31 #64B231 #31A5B2
split-complementary
#7F31B2 #A5B231 #31B23F
monochromatic
#3B1752 #5D2482 #7F31B2 #9D51CF #B881DC

Accessibility & contrast

On white

7.04
#7F31B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.98
#7F31B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #7F31B2
7.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##7F31B2#FFFFFF#000000##FFFFFF
##7F31B21.007.042.987.04
#FFFFFF7.041.0021.001.00
#0000002.9821.001.0021.00
##FFFFFF7.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056B6
Deuteranopia (green-blind)
#0A5AAF
Tritanopia (blue-blind)
#774F6F
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #7f31b2;
/* rgb */ color: rgb(127, 49, 178);
/* oklch */ color: oklch(48.7% 0.196 308.3);
Tailwind
colors: {
  custom: {
    50: '#a970ca',
    500: '#7f31b2',
    950: '#000000',
  },
}
SCSS
$custom: #7f31b2;
$custom-light: #a970ca;
$custom-dark: #000000;
JSON
{
  "hex": "#7f31b2",
  "rgb": {
    "r": 127,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 276.279,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.48746,
    "c": 0.19609,
    "h": 308.3
  },
  "luminance": 0.09923
}

Semantic roles & 50–950 ramp

primary
#7F31B2
secondary
#97C579
accent
#E04884
background
#FAF7FC
surface
#F4EDF8
border
#CEC8D1
text
#100813
muted
#7F7B82

Preview Lab

Preview with #7F31B2

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

Preview Lab → · Contrast checker → · Palette generator →

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