#5F2897#5F2897

#5F2897 is a dark, vivid violet. Relative luminance 0.062; OKLCH L 41.6% C 0.171 H 302.0°. Best body text is #FFFFFF at 9.39:1 contrast (WCAG AA passes).

Color values

HEX#5F2897
RGBrgb(95, 40, 151)
HSLhsl(270, 58%, 37%)
HSVhsv(270, 74%, 59%)
CMYKcmyk(37.1%, 73.5%, 0%, 40.8%)
CIE-LABlab(29.87, 46.39, -50.88)
CIE-LCHlch(29.87, 68.85, 312.36°)
OKLaboklab(41.62% 0.0905 -0.145)
OKLCHoklch(41.62% 0.171 302)
XYZxyz(11.0627, 6.1848, 29.8831)
Luminance0.0619 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F2897 #609728
analogous
#282897 #5F2897 #972897
triadic
#5F2897 #975F28 #28975F
tetradic
#5F2897 #972828 #609728 #289797
square
#5F2897 #972828 #609728 #289797
split-complementary
#5F2897 #979728 #289728
monochromatic
#220E36 #411B67 #5F2897 #7D35C7 #9C64D6

Accessibility & contrast

On white

9.39
#5F2897 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.24
#5F2897 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F2897
9.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F2897#FFFFFF#000000##FFFFFF
##5F28971.009.392.249.39
#FFFFFF9.391.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.391.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5f2897;
/* rgb */ color: rgb(95, 40, 151);
/* oklch */ color: oklch(41.6% 0.171 302.0);
Tailwind
colors: {
  custom: {
    50: '#9267b6',
    500: '#5f2897',
    950: '#000000',
  },
}
SCSS
$custom: #5f2897;
$custom-light: #9267b6;
$custom-dark: #000000;
JSON
{
  "hex": "#5f2897",
  "rgb": {
    "r": 95,
    "g": 40,
    "b": 151
  },
  "hsl": {
    "h": 269.73,
    "s": 58.115,
    "l": 37.451
  },
  "oklch": {
    "l": 0.41617,
    "c": 0.17093,
    "h": 302
  },
  "luminance": 0.06185
}

Semantic roles & 50–950 ramp

primary
#5F2897
secondary
#8EBC5F
accent
#E14695
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5F2897

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

Preview Lab → · Contrast checker → · Palette generator →

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