#512BA5#512BA5

#512BA5 is a dark, vivid violet. Relative luminance 0.062; OKLCH L 41.6% C 0.182 H 290.5°. Best body text is #FFFFFF at 9.38:1 contrast (WCAG AA passes).

Color values

HEX#512BA5
RGBrgb(81, 43, 165)
HSLhsl(259, 59%, 41%)
HSVhsv(259, 74%, 65%)
CMYKcmyk(50.9%, 73.9%, 0%, 35.3%)
CIE-LABlab(29.89, 46.19, -59.43)
CIE-LCHlch(29.89, 75.26, 307.85°)
OKLaboklab(41.62% 0.0636 -0.1706)
OKLCHoklch(41.62% 0.182 290.5)
XYZxyz(11.0468, 6.1932, 36.2034)
Luminance0.0619 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512BA5 #7FA52B
analogous
#2B42A5 #512BA5 #8E2BA5
triadic
#512BA5 #A5512B #2BA551
tetradic
#512BA5 #A52B42 #7FA52B #2BA58E
square
#512BA5 #A52B42 #7FA52B #2BA58E
split-complementary
#512BA5 #A58E2B #42A52B
monochromatic
#211244 #391E74 #512BA5 #6C40CD #9171DA

Accessibility & contrast

On white

9.38
#512BA5 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.24
#512BA5 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512BA5
9.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512BA5#FFFFFF#000000##FFFFFF
##512BA51.009.382.249.38
#FFFFFF9.381.0021.001.00
#0000002.2421.001.0021.00
##FFFFFF9.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049A9
Deuteranopia (green-blind)
#0044A3
Tritanopia (blue-blind)
#344C65
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #512ba5;
/* rgb */ color: rgb(81, 43, 165);
/* oklch */ color: oklch(41.6% 0.182 290.5);
Tailwind
colors: {
  custom: {
    50: '#8a68c1',
    500: '#512ba5',
    950: '#000000',
  },
}
SCSS
$custom: #512ba5;
$custom-light: #8a68c1;
$custom-dark: #000000;
JSON
{
  "hex": "#512ba5",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 165
  },
  "hsl": {
    "h": 258.689,
    "s": 58.654,
    "l": 40.784
  },
  "oklch": {
    "l": 0.4162,
    "c": 0.18212,
    "h": 290.5
  },
  "luminance": 0.06194
}

Semantic roles & 50–950 ramp

primary
#512BA5
secondary
#A6C16B
accent
#E246B1
background
#F9F6FC
surface
#F1EBF8
border
#CBC6D1
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #512BA5

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

Preview Lab → · Contrast checker → · Palette generator →

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