#512EB3#512EB3

#512EB3 is a dark, vivid violet. Relative luminance 0.070; OKLCH L 43.3% C 0.195 H 287.2°. Best body text is #FFFFFF at 8.78:1 contrast (WCAG AA passes).

Color values

HEX#512EB3
RGBrgb(81, 46, 179)
HSLhsl(256, 59%, 44%)
HSVhsv(256, 74%, 70%)
CMYKcmyk(54.7%, 74.3%, 0%, 29.8%)
CIE-LABlab(31.71, 48.66, -64.84)
CIE-LCHlch(31.71, 81.07, 306.88°)
OKLaboklab(43.29% 0.0578 -0.1865)
OKLCHoklch(43.29% 0.195 287.2)
XYZxyz(12.5046, 6.9573, 43.3231)
Luminance0.0696 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512EB3 #90B32E
analogous
#2E4EB3 #512EB3 #942EB3
triadic
#512EB3 #B3512E #2EB351
tetradic
#512EB3 #B32E4E #90B32E #2EB394
square
#512EB3 #B32E4E #90B32E #2EB394
split-complementary
#512EB3 #B3942E #4EB32E
monochromatic
#251552 #3B2182 #512EB3 #704DD1 #977EDE

Accessibility & contrast

On white

8.78
#512EB3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#512EB3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512EB3
8.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512EB3#FFFFFF#000000##FFFFFF
##512EB31.008.782.398.78
#FFFFFF8.781.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EB7
Deuteranopia (green-blind)
#0047B1
Tritanopia (blue-blind)
#27536E
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #512eb3;
/* rgb */ color: rgb(81, 46, 179);
/* oklch */ color: oklch(43.3% 0.195 287.2);
Tailwind
colors: {
  custom: {
    50: '#8c6bcb',
    500: '#512eb3',
    950: '#000000',
  },
}
SCSS
$custom: #512eb3;
$custom-light: #8c6bcb;
$custom-dark: #000000;
JSON
{
  "hex": "#512eb3",
  "rgb": {
    "r": 81,
    "g": 46,
    "b": 179
  },
  "hsl": {
    "h": 255.789,
    "s": 59.111,
    "l": 44.118
  },
  "oklch": {
    "l": 0.43291,
    "c": 0.19527,
    "h": 287.2
  },
  "luminance": 0.06958
}

Semantic roles & 50–950 ramp

primary
#512EB3
secondary
#B1C676
accent
#E246B9
background
#F9F6FC
surface
#F1EBF9
border
#CBC6D2
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #512EB3

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

Preview Lab → · Contrast checker → · Palette generator →

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