#5128B6#5128B6

#5128B6 is a dark, highly saturated violet. Relative luminance 0.066; OKLCH L 42.9% C 0.205 H 287.5°. Best body text is #FFFFFF at 9.02:1 contrast (WCAG AA passes).

Color values

HEX#5128B6
RGBrgb(81, 40, 182)
HSLhsl(257, 64%, 44%)
HSVhsv(257, 78%, 71%)
CMYKcmyk(55.5%, 78%, 0%, 28.6%)
CIE-LABlab(30.98, 52.39, -67.82)
CIE-LCHlch(30.98, 85.70, 307.69°)
OKLaboklab(42.87% 0.0614 -0.1952)
OKLCHoklch(42.87% 0.205 287.5)
XYZxyz(12.5931, 6.6436, 44.8657)
Luminance0.0664 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5128B6 #8DB628
analogous
#2846B6 #5128B6 #9828B6
triadic
#5128B6 #B65128 #28B651
tetradic
#5128B6 #B62846 #8DB628 #28B698
square
#5128B6 #B62846 #8DB628 #28B698
split-complementary
#5128B6 #B69828 #46B628
monochromatic
#241252 #3B1D84 #5128B6 #6F45D6 #9677E1

Accessibility & contrast

On white

9.02
#5128B6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#5128B6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5128B6
9.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5128B6#FFFFFF#000000##FFFFFF
##5128B61.009.022.339.02
#FFFFFF9.021.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CBA
Deuteranopia (green-blind)
#0045B3
Tritanopia (blue-blind)
#24516E
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #5128b6;
/* rgb */ color: rgb(81, 40, 182);
/* oklch */ color: oklch(42.9% 0.205 287.5);
Tailwind
colors: {
  custom: {
    50: '#8d67cd',
    500: '#5128b6',
    950: '#000000',
  },
}
SCSS
$custom: #5128b6;
$custom-light: #8d67cd;
$custom-dark: #000000;
JSON
{
  "hex": "#5128b6",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 182
  },
  "hsl": {
    "h": 257.324,
    "s": 63.964,
    "l": 43.529
  },
  "oklch": {
    "l": 0.42867,
    "c": 0.20464,
    "h": 287.5
  },
  "luminance": 0.06644
}

Semantic roles & 50–950 ramp

primary
#5128B6
secondary
#AFC971
accent
#E741B7
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0614
muted
#7E7A82

Preview Lab

Preview with #5128B6

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

Preview Lab → · Contrast checker → · Palette generator →

#5128B6 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva