#5F2797#5F2797

#5F2797 is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.5% C 0.172 H 302.1°. Best body text is #FFFFFF at 9.44:1 contrast (WCAG AA passes).

Color values

HEX#5F2797
RGBrgb(95, 39, 151)
HSLhsl(270, 59%, 37%)
HSVhsv(270, 74%, 59%)
CMYKcmyk(37.1%, 74.2%, 0%, 40.8%)
CIE-LABlab(29.71, 46.86, -51.15)
CIE-LCHlch(29.71, 69.37, 312.49°)
OKLaboklab(41.5% 0.0915 -0.1458)
OKLCHoklch(41.5% 0.172 302.1)
XYZxyz(11.0294, 6.1183, 29.8720)
Luminance0.0612 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F2797 #5F9727
analogous
#272797 #5F2797 #972797
triadic
#5F2797 #975F27 #27975F
tetradic
#5F2797 #972727 #5F9727 #279797
square
#5F2797 #972727 #5F9727 #279797
split-complementary
#5F2797 #979727 #279727
monochromatic
#220E36 #401A66 #5F2797 #7E34C8 #9C62D6

Accessibility & contrast

On white

9.44
#5F2797 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.22
#5F2797 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F2797
9.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F2797#FFFFFF#000000##FFFFFF
##5F27971.009.442.229.44
#FFFFFF9.441.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00459A
Deuteranopia (green-blind)
#004595
Tritanopia (blue-blind)
#53435D
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5f2797;
/* rgb */ color: rgb(95, 39, 151);
/* oklch */ color: oklch(41.5% 0.172 302.1);
Tailwind
colors: {
  custom: {
    50: '#9267b6',
    500: '#5f2797',
    950: '#000000',
  },
}
SCSS
$custom: #5f2797;
$custom-light: #9267b6;
$custom-dark: #000000;
JSON
{
  "hex": "#5f2797",
  "rgb": {
    "r": 95,
    "g": 39,
    "b": 151
  },
  "hsl": {
    "h": 270,
    "s": 58.947,
    "l": 37.255
  },
  "oklch": {
    "l": 0.415,
    "c": 0.17213,
    "h": 302.1
  },
  "luminance": 0.06118
}

Semantic roles & 50–950 ramp

primary
#5F2797
secondary
#8DBC5E
accent
#E24694
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5F2797

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

Preview Lab → · Contrast checker → · Palette generator →

#5F2797 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva