#512BB5#512BB5

#512BB5 is a dark, highly saturated violet. Relative luminance 0.068; OKLCH L 43.1% C 0.201 H 287.3°. Best body text is #FFFFFF at 8.89:1 contrast (WCAG AA passes).

Color values

HEX#512BB5
RGBrgb(81, 43, 181)
HSLhsl(257, 62%, 44%)
HSVhsv(257, 76%, 71%)
CMYKcmyk(55.2%, 76.2%, 0%, 29%)
CIE-LABlab(31.38, 50.70, -66.58)
CIE-LCHlch(31.38, 83.69, 307.29°)
OKLaboklab(43.11% 0.0595 -0.1916)
OKLCHoklch(43.11% 0.201 287.3)
XYZxyz(12.5952, 6.8126, 44.3584)
Luminance0.0681 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512BB5 #8FB52B
analogous
#2B4AB5 #512BB5 #962BB5
triadic
#512BB5 #B5512B #2BB551
tetradic
#512BB5 #B52B4A #8FB52B #2BB596
square
#512BB5 #B52B4A #8FB52B #2BB596
split-complementary
#512BB5 #B5962B #4AB52B
monochromatic
#251452 #3B1F84 #512BB5 #6F49D4 #977BE0

Accessibility & contrast

On white

8.89
#512BB5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.36
#512BB5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512BB5
8.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512BB5#FFFFFF#000000##FFFFFF
##512BB51.008.892.368.89
#FFFFFF8.891.0021.001.00
#0000002.3621.001.0021.00
##FFFFFF8.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004DB9
Deuteranopia (green-blind)
#0046B2
Tritanopia (blue-blind)
#25526F
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #512bb5;
/* rgb */ color: rgb(81, 43, 181);
/* oklch */ color: oklch(43.1% 0.201 287.3);
Tailwind
colors: {
  custom: {
    50: '#8d69cc',
    500: '#512bb5',
    950: '#000000',
  },
}
SCSS
$custom: #512bb5;
$custom-light: #8d69cc;
$custom-dark: #000000;
JSON
{
  "hex": "#512bb5",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 181
  },
  "hsl": {
    "h": 256.522,
    "s": 61.607,
    "l": 43.922
  },
  "oklch": {
    "l": 0.43114,
    "c": 0.20064,
    "h": 287.3
  },
  "luminance": 0.06813
}

Semantic roles & 50–950 ramp

primary
#512BB5
secondary
#B1C874
accent
#E543B8
background
#F9F6FC
surface
#F2EBF9
border
#CCC6D2
text
#0D0714
muted
#7E7A82

Preview Lab

Preview with #512BB5

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

Preview Lab → · Contrast checker → · Palette generator →

#512BB5 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva