#5127A2#5127A2

#5127A2 is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.9% C 0.183 H 291.7°. Best body text is #FFFFFF at 9.71:1 contrast (WCAG AA passes).

Color values

HEX#5127A2
RGBrgb(81, 39, 162)
HSLhsl(260, 61%, 39%)
HSVhsv(260, 76%, 64%)
CMYKcmyk(50%, 75.9%, 0%, 36.5%)
CIE-LABlab(28.92, 47.32, -59.20)
CIE-LCHlch(28.92, 75.79, 308.64°)
OKLaboklab(40.85% 0.0678 -0.17)
OKLCHoklch(40.85% 0.183 291.7)
XYZxyz(10.6386, 5.8086, 34.7360)
Luminance0.0581 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5127A2 #78A227
analogous
#273AA2 #5127A2 #8F27A2
triadic
#5127A2 #A25127 #27A251
tetradic
#5127A2 #A2273A #78A227 #27A28F
square
#5127A2 #A2273A #78A227 #27A28F
split-complementary
#5127A2 #A28F27 #3AA227
monochromatic
#200F3F #381B71 #5127A2 #6B37CF #9069DB

Accessibility & contrast

On white

9.71
#5127A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.16
#5127A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5127A2
9.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5127A2#FFFFFF#000000##FFFFFF
##5127A21.009.712.169.71
#FFFFFF9.711.0021.001.00
#0000002.1621.001.0021.00
##FFFFFF9.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A6
Deuteranopia (green-blind)
#0042A0
Tritanopia (blue-blind)
#364963
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5127a2;
/* rgb */ color: rgb(81, 39, 162);
/* oklch */ color: oklch(40.9% 0.183 291.7);
Tailwind
colors: {
  custom: {
    50: '#8a66bf',
    500: '#5127a2',
    950: '#000000',
  },
}
SCSS
$custom: #5127a2;
$custom-light: #8a66bf;
$custom-dark: #000000;
JSON
{
  "hex": "#5127a2",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 162
  },
  "hsl": {
    "h": 260.488,
    "s": 61.194,
    "l": 39.412
  },
  "oklch": {
    "l": 0.40853,
    "c": 0.18298,
    "h": 291.7
  },
  "luminance": 0.05809
}

Semantic roles & 50–950 ramp

primary
#5127A2
secondary
#A1C164
accent
#E443AD
background
#F9F6FB
surface
#F1EBF7
border
#CBC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5127A2

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

Preview Lab → · Contrast checker → · Palette generator →

#5127A2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva