#5126A2#5126A2

#5126A2 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.7% C 0.184 H 291.9°. Best body text is #FFFFFF at 9.77:1 contrast (WCAG AA passes).

Color values

HEX#5126A2
RGBrgb(81, 38, 162)
HSLhsl(261, 62%, 39%)
HSVhsv(261, 77%, 64%)
CMYKcmyk(50%, 76.5%, 0%, 36.5%)
CIE-LABlab(28.76, 47.80, -59.48)
CIE-LCHlch(28.76, 76.31, 308.79°)
OKLaboklab(40.74% 0.0686 -0.1708)
OKLCHoklch(40.74% 0.184 291.9)
XYZxyz(10.6062, 5.7438, 34.7252)
Luminance0.0574 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5126A2 #77A226
analogous
#2639A2 #5126A2 #8F26A2
triadic
#5126A2 #A25126 #26A251
tetradic
#5126A2 #A22639 #77A226 #26A28F
square
#5126A2 #A22639 #77A226 #26A28F
split-complementary
#5126A2 #A28F26 #39A226
monochromatic
#1F0F3F #381A70 #5126A2 #6B35D0 #8F67DB

Accessibility & contrast

On white

9.77
#5126A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#5126A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5126A2
9.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5126A2#FFFFFF#000000##FFFFFF
##5126A21.009.772.159.77
#FFFFFF9.771.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0046A6
Deuteranopia (green-blind)
#0041A0
Tritanopia (blue-blind)
#364863
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5126a2;
/* rgb */ color: rgb(81, 38, 162);
/* oklch */ color: oklch(40.7% 0.184 291.9);
Tailwind
colors: {
  custom: {
    50: '#8a65bf',
    500: '#5126a2',
    950: '#000000',
  },
}
SCSS
$custom: #5126a2;
$custom-light: #8a65bf;
$custom-dark: #000000;
JSON
{
  "hex": "#5126a2",
  "rgb": {
    "r": 81,
    "g": 38,
    "b": 162
  },
  "hsl": {
    "h": 260.806,
    "s": 62,
    "l": 39.216
  },
  "oklch": {
    "l": 0.40735,
    "c": 0.18403,
    "h": 291.9
  },
  "luminance": 0.05744
}

Semantic roles & 50–950 ramp

primary
#5126A2
secondary
#A0C163
accent
#E543AD
background
#F9F6FB
surface
#F1EBF7
border
#CBC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5126A2

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

Preview Lab → · Contrast checker → · Palette generator →

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