#512188#512188

#512188 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 37.8% C 0.160 H 299.9°. Best body text is #FFFFFF at 10.92:1 contrast (WCAG AA passes).

Color values

HEX#512188
RGBrgb(81, 33, 136)
HSLhsl(268, 61%, 33%)
HSVhsv(268, 76%, 53%)
CMYKcmyk(40.4%, 75.7%, 0%, 46.7%)
CIE-LABlab(25.61, 43.20, -48.63)
CIE-LCHlch(25.61, 65.05, 311.61°)
OKLaboklab(37.81% 0.0798 -0.1389)
OKLCHoklch(37.81% 0.16 299.9)
XYZxyz(8.3800, 4.6145, 23.7370)
Luminance0.0461 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512188 #588821
analogous
#212488 #512188 #842188
triadic
#512188 #885121 #218851
tetradic
#512188 #882124 #588821 #218884
square
#512188 #882124 #588821 #218884
split-complementary
#512188 #888421 #248821
monochromatic
#160925 #341557 #512188 #6E2DB9 #8D4FD4

Accessibility & contrast

On white

10.92
#512188 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #512188
10.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512188#FFFFFF#000000##FFFFFF
##5121881.0010.921.9210.92
#FFFFFF10.921.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8B
Deuteranopia (green-blind)
#003C86
Tritanopia (blue-blind)
#443B53
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #512188;
/* rgb */ color: rgb(81, 33, 136);
/* oklch */ color: oklch(37.8% 0.160 299.9);
Tailwind
colors: {
  custom: {
    50: '#8761ac',
    500: '#512188',
    950: '#000000',
  },
}
SCSS
$custom: #512188;
$custom-light: #8761ac;
$custom-dark: #000000;
JSON
{
  "hex": "#512188",
  "rgb": {
    "r": 81,
    "g": 33,
    "b": 136
  },
  "hsl": {
    "h": 267.961,
    "s": 60.947,
    "l": 33.137
  },
  "oklch": {
    "l": 0.37806,
    "c": 0.16016,
    "h": 299.9
  },
  "luminance": 0.04615
}

Semantic roles & 50–950 ramp

primary
#512188
secondary
#86B84D
accent
#E44499
background
#F8F5FA
surface
#F0EAF4
border
#CBC6CE
text
#0C0510
muted
#7D797F

Preview Lab

Preview with #512188

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

Preview Lab → · Contrast checker → · Palette generator →

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