#5121A8#5121A8

#5121A8 is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.8% C 0.196 H 291.2°. Best body text is #FFFFFF at 9.85:1 contrast (WCAG AA passes).

Color values

HEX#5121A8
RGBrgb(81, 33, 168)
HSLhsl(261, 67%, 39%)
HSVhsv(261, 80%, 66%)
CMYKcmyk(51.8%, 80.4%, 0%, 34.1%)
CIE-LABlab(28.55, 51.67, -63.45)
CIE-LCHlch(28.55, 81.83, 309.16°)
OKLaboklab(40.76% 0.0706 -0.1823)
OKLCHoklch(40.76% 0.196 291.2)
XYZxyz(11.0031, 5.6637, 37.5517)
Luminance0.0566 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5121A8 #78A821
analogous
#2135A8 #5121A8 #9521A8
triadic
#5121A8 #A85121 #21A851
tetradic
#5121A8 #A82135 #78A821 #21A895
square
#5121A8 #A82135 #78A821 #21A895
split-complementary
#5121A8 #A89521 #35A821
monochromatic
#200D42 #381775 #5121A8 #6B30D6 #9063E0

Accessibility & contrast

On white

9.85
#5121A8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#5121A8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5121A8
9.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5121A8#FFFFFF#000000##FFFFFF
##5121A81.009.852.139.85
#FFFFFF9.851.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0045AC
Deuteranopia (green-blind)
#0040A6
Tritanopia (blue-blind)
#324865
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5121a8;
/* rgb */ color: rgb(81, 33, 168);
/* oklch */ color: oklch(40.8% 0.196 291.2);
Tailwind
colors: {
  custom: {
    50: '#8c63c3',
    500: '#5121a8',
    950: '#000000',
  },
}
SCSS
$custom: #5121a8;
$custom-light: #8c63c3;
$custom-dark: #000000;
JSON
{
  "hex": "#5121a8",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 168
  },
  "hsl": {
    "h": 261.333,
    "s": 67.164,
    "l": 39.412
  },
  "oklch": {
    "l": 0.40763,
    "c": 0.19553,
    "h": 291.2
  },
  "luminance": 0.05664
}

Semantic roles & 50–950 ramp

primary
#5121A8
secondary
#A1C55F
accent
#EA3EAD
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0613
muted
#7E7A82

Preview Lab

Preview with #5121A8

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

Preview Lab → · Contrast checker → · Palette generator →

#5121A8 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva