#5126B1#5126B1

#5126B1 is a dark, highly saturated violet. Relative luminance 0.063; OKLCH L 42.2% C 0.201 H 288.7°. Best body text is #FFFFFF at 9.28:1 contrast (WCAG AA passes).

Color values

HEX#5126B1
RGBrgb(81, 38, 177)
HSLhsl(259, 65%, 42%)
HSVhsv(259, 79%, 69%)
CMYKcmyk(54.2%, 78.5%, 0%, 30.6%)
CIE-LABlab(30.18, 51.92, -66.17)
CIE-LCHlch(30.18, 84.10, 308.12°)
OKLaboklab(42.16% 0.0643 -0.1903)
OKLCHoklch(42.16% 0.201 288.7)
XYZxyz(12.0199, 6.3093, 42.1709)
Luminance0.0631 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5126B1 #86B126
analogous
#2641B1 #5126B1 #9726B1
triadic
#5126B1 #B15126 #26B151
tetradic
#5126B1 #B12641 #86B126 #26B197
square
#5126B1 #B12641 #86B126 #26B197
split-complementary
#5126B1 #B19726 #41B126
monochromatic
#23104C #3A1B7F #5126B1 #6D3FD6 #9371E0

Accessibility & contrast

On white

9.28
#5126B1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#5126B1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5126B1
9.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5126B1#FFFFFF#000000##FFFFFF
##5126B11.009.282.269.28
#FFFFFF9.281.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AB5
Deuteranopia (green-blind)
#0043AE
Tritanopia (blue-blind)
#2A4E6B
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #5126b1;
/* rgb */ color: rgb(81, 38, 177);
/* oklch */ color: oklch(42.2% 0.201 288.7);
Tailwind
colors: {
  custom: {
    50: '#8d66ca',
    500: '#5126b1',
    950: '#000000',
  },
}
SCSS
$custom: #5126b1;
$custom-light: #8d66ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5126b1",
  "rgb": {
    "r": 81,
    "g": 38,
    "b": 177
  },
  "hsl": {
    "h": 258.561,
    "s": 64.651,
    "l": 42.157
  },
  "oklch": {
    "l": 0.42162,
    "c": 0.2009,
    "h": 288.7
  },
  "luminance": 0.0631
}

Semantic roles & 50–950 ramp

primary
#5126B1
secondary
#ABC76B
accent
#E840B4
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #5126B1

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

Preview Lab → · Contrast checker → · Palette generator →

#5126B1 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva