#512187#512187

#512187 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.7% C 0.159 H 300.2°. Best body text is #FFFFFF at 10.95:1 contrast (WCAG AA passes).

Color values

HEX#512187
RGBrgb(81, 33, 135)
HSLhsl(268, 61%, 33%)
HSVhsv(268, 76%, 53%)
CMYKcmyk(40%, 75.6%, 0%, 47.1%)
CIE-LABlab(25.52, 42.94, -48.15)
CIE-LCHlch(25.52, 64.51, 311.73°)
OKLaboklab(37.72% 0.08 -0.1375)
OKLCHoklch(37.72% 0.159 300.2)
XYZxyz(8.3093, 4.5862, 23.3644)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512187 #578721
analogous
#212487 #512187 #842187
triadic
#512187 #875121 #218751
tetradic
#512187 #872124 #578721 #218784
square
#512187 #872124 #578721 #218784
split-complementary
#512187 #878421 #248721
monochromatic
#160925 #331556 #512187 #6F2DB8 #8D4FD4

Accessibility & contrast

On white

10.95
#512187 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#512187 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512187
10.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512187#FFFFFF#000000##FFFFFF
##5121871.0010.951.9210.95
#FFFFFF10.951.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8A
Deuteranopia (green-blind)
#003C85
Tritanopia (blue-blind)
#453B52
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #512187;
/* rgb */ color: rgb(81, 33, 135);
/* oklch */ color: oklch(37.7% 0.159 300.2);
Tailwind
colors: {
  custom: {
    50: '#8761ab',
    500: '#512187',
    950: '#000000',
  },
}
SCSS
$custom: #512187;
$custom-light: #8761ab;
$custom-dark: #000000;
JSON
{
  "hex": "#512187",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 135
  },
  "hsl": {
    "h": 268.235,
    "s": 60.714,
    "l": 32.941
  },
  "oklch": {
    "l": 0.3772,
    "c": 0.15905,
    "h": 300.2
  },
  "luminance": 0.04586
}

Semantic roles & 50–950 ramp

primary
#512187
secondary
#85B74D
accent
#E44499
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #512187

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

Preview Lab → · Contrast checker → · Palette generator →

#512187 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva