#5128B4#5128B4

#5128B4 is a dark, highly saturated violet. Relative luminance 0.066; OKLCH L 42.7% C 0.202 H 287.8°. Best body text is #FFFFFF at 9.08:1 contrast (WCAG AA passes).

Color values

HEX#5128B4
RGBrgb(81, 40, 180)
HSLhsl(258, 64%, 43%)
HSVhsv(258, 78%, 71%)
CMYKcmyk(55%, 77.8%, 0%, 29.4%)
CIE-LABlab(30.79, 51.84, -66.95)
CIE-LCHlch(30.79, 84.68, 307.75°)
OKLaboklab(42.67% 0.062 -0.1927)
OKLCHoklch(42.67% 0.202 287.8)
XYZxyz(12.3879, 6.5616, 43.7849)
Luminance0.0656 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5128B4 #8BB428
analogous
#2845B4 #5128B4 #9728B4
triadic
#5128B4 #B45128 #28B451
tetradic
#5128B4 #B42845 #8BB428 #28B497
square
#5128B4 #B42845 #8BB428 #28B497
split-complementary
#5128B4 #B49728 #45B428
monochromatic
#241250 #3A1D82 #5128B4 #6E44D5 #9576E1

Accessibility & contrast

On white

9.08
#5128B4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.31
#5128B4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5128B4
9.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5128B4#FFFFFF#000000##FFFFFF
##5128B41.009.082.319.08
#FFFFFF9.081.0021.001.00
#0000002.3121.001.0021.00
##FFFFFF9.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CB8
Deuteranopia (green-blind)
#0045B1
Tritanopia (blue-blind)
#27506D
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #5128b4;
/* rgb */ color: rgb(81, 40, 180);
/* oklch */ color: oklch(42.7% 0.202 287.8);
Tailwind
colors: {
  custom: {
    50: '#8d67cc',
    500: '#5128b4',
    950: '#000000',
  },
}
SCSS
$custom: #5128b4;
$custom-light: #8d67cc;
$custom-dark: #000000;
JSON
{
  "hex": "#5128b4",
  "rgb": {
    "r": 81,
    "g": 40,
    "b": 180
  },
  "hsl": {
    "h": 257.571,
    "s": 63.636,
    "l": 43.137
  },
  "oklch": {
    "l": 0.42673,
    "c": 0.20238,
    "h": 287.8
  },
  "luminance": 0.06562
}

Semantic roles & 50–950 ramp

primary
#5128B4
secondary
#AEC870
accent
#E741B6
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #5128B4

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

Preview Lab → · Contrast checker → · Palette generator →

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