#5127A6#5127A6

#5127A6 is a dark, vivid violet. Relative luminance 0.060; OKLCH L 41.2% C 0.188 H 290.8°. Best body text is #FFFFFF at 9.59:1 contrast (WCAG AA passes).

Color values

HEX#5127A6
RGBrgb(81, 39, 166)
HSLhsl(260, 62%, 40%)
HSVhsv(260, 77%, 65%)
CMYKcmyk(51.2%, 76.5%, 0%, 34.9%)
CIE-LABlab(29.29, 48.43, -61.02)
CIE-LCHlch(29.29, 77.90, 308.44°)
OKLaboklab(41.23% 0.0667 -0.1753)
OKLCHoklch(41.23% 0.188 290.8)
XYZxyz(10.9998, 5.9531, 36.6385)
Luminance0.0595 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5127A6 #7CA627
analogous
#273CA6 #5127A6 #9127A6
triadic
#5127A6 #A65127 #27A651
tetradic
#5127A6 #A6273C #7CA627 #27A691
square
#5127A6 #A6273C #7CA627 #27A691
split-complementary
#5127A6 #A69127 #3CA627
monochromatic
#211043 #391B74 #5127A6 #6C3AD1 #916BDC

Accessibility & contrast

On white

9.59
#5127A6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#5127A6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5127A6
9.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5127A6#FFFFFF#000000##FFFFFF
##5127A61.009.592.199.59
#FFFFFF9.591.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0047AA
Deuteranopia (green-blind)
#0042A4
Tritanopia (blue-blind)
#334A65
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #5127a6;
/* rgb */ color: rgb(81, 39, 166);
/* oklch */ color: oklch(41.2% 0.188 290.8);
Tailwind
colors: {
  custom: {
    50: '#8b66c1',
    500: '#5127a6',
    950: '#000000',
  },
}
SCSS
$custom: #5127a6;
$custom-light: #8b66c1;
$custom-dark: #000000;
JSON
{
  "hex": "#5127a6",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 166
  },
  "hsl": {
    "h": 259.843,
    "s": 61.951,
    "l": 40.196
  },
  "oklch": {
    "l": 0.41225,
    "c": 0.18754,
    "h": 290.8
  },
  "luminance": 0.05954
}

Semantic roles & 50–950 ramp

primary
#5127A6
secondary
#A4C366
accent
#E543AF
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5127A6

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

Preview Lab → · Contrast checker → · Palette generator →

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