#5125B2#5125B2

#5125B2 is a dark, highly saturated violet. Relative luminance 0.063; OKLCH L 42.2% C 0.203 H 288.6°. Best body text is #FFFFFF at 9.30:1 contrast (WCAG AA passes).

Color values

HEX#5125B2
RGBrgb(81, 37, 178)
HSLhsl(259, 66%, 42%)
HSVhsv(259, 79%, 70%)
CMYKcmyk(54.5%, 79.2%, 0%, 30.2%)
CIE-LABlab(30.12, 52.64, -66.86)
CIE-LCHlch(30.12, 85.09, 308.22°)
OKLaboklab(42.15% 0.0647 -0.1923)
OKLCHoklch(42.15% 0.203 288.6)
XYZxyz(12.0884, 6.2862, 42.6872)
Luminance0.0629 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5125B2 #86B225
analogous
#2540B2 #5125B2 #9725B2
triadic
#5125B2 #B25125 #25B251
tetradic
#5125B2 #B22540 #86B225 #25B297
square
#5125B2 #B22540 #86B225 #25B297
split-complementary
#5125B2 #B29725 #40B225
monochromatic
#23104D #3A1A7F #5125B2 #6D3DD7 #9370E1

Accessibility & contrast

On white

9.30
#5125B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#5125B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5125B2
9.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5125B2#FFFFFF#000000##FFFFFF
##5125B21.009.302.269.30
#FFFFFF9.301.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AB6
Deuteranopia (green-blind)
#0043AF
Tritanopia (blue-blind)
#294E6B
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #5125b2;
/* rgb */ color: rgb(81, 37, 178);
/* oklch */ color: oklch(42.2% 0.203 288.6);
Tailwind
colors: {
  custom: {
    50: '#8d66ca',
    500: '#5125b2',
    950: '#000000',
  },
}
SCSS
$custom: #5125b2;
$custom-light: #8d66ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5125b2",
  "rgb": {
    "r": 81,
    "g": 37,
    "b": 178
  },
  "hsl": {
    "h": 258.723,
    "s": 65.581,
    "l": 42.157
  },
  "oklch": {
    "l": 0.42152,
    "c": 0.20292,
    "h": 288.6
  },
  "luminance": 0.06287
}

Semantic roles & 50–950 ramp

primary
#5125B2
secondary
#ABC86B
accent
#E93FB4
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #5125B2

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

Preview Lab → · Contrast checker → · Palette generator →

#5125B2 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva