#5F127E#5F127E

#5F127E is a dark, vivid purple. Relative luminance 0.044; OKLCH L 37.5% C 0.169 H 313.2°. Best body text is #FFFFFF at 11.20:1 contrast (WCAG AA passes).

Color values

HEX#5F127E
RGBrgb(95, 18, 126)
HSLhsl(283, 75%, 28%)
HSVhsv(283, 86%, 49%)
CMYKcmyk(24.6%, 85.7%, 0%, 50.6%)
CIE-LABlab(24.87, 49.20, -43.46)
CIE-LCHlch(24.87, 65.64, 318.54°)
OKLaboklab(37.46% 0.1158 -0.1231)
OKLCHoklch(37.46% 0.169 313.2)
XYZxyz(8.7008, 4.3722, 20.1202)
Luminance0.0437 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F127E #317E12
analogous
#29127E #5F127E #7E1267
triadic
#5F127E #7E5F12 #127E5F
tetradic
#5F127E #7E2912 #317E12 #12677E
square
#5F127E #7E2912 #317E12 #12677E
split-complementary
#5F127E #677E12 #127E29
monochromatic
#14041B #370A48 #5F127E #871AB4 #AC2AE1

Accessibility & contrast

On white

11.20
#5F127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.87
#5F127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F127E
11.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F127E#FFFFFF#000000##FFFFFF
##5F127E1.0011.201.8711.20
#FFFFFF11.201.0021.001.00
#0000001.8721.001.0021.00
##FFFFFF11.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003781
Deuteranopia (green-blind)
#003D7C
Tritanopia (blue-blind)
#5C2E4A
Achromatopsia (no color)
#3B3B3B

Design tokens & code

CSS
--color: #5f127e;
/* rgb */ color: rgb(95, 18, 126);
/* oklch */ color: oklch(37.5% 0.169 313.2);
Tailwind
colors: {
  custom: {
    50: '#915ca4',
    500: '#5f127e',
    950: '#000000',
  },
}
SCSS
$custom: #5f127e;
$custom-light: #915ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#5f127e",
  "rgb": {
    "r": 95,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 282.778,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.37465,
    "c": 0.16894,
    "h": 313.2
  },
  "luminance": 0.04372
}

Semantic roles & 50–950 ramp

primary
#5F127E
secondary
#5CB438
accent
#F2366C
background
#F9F5FA
surface
#F2E9F4
border
#CCC5CE
text
#0D050F
muted
#7E797F

Preview Lab

Preview with #5F127E

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

Preview Lab → · Contrast checker → · Palette generator →

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