#512B8E#512B8E

#512B8E is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.6% C 0.155 H 296.2°. Best body text is #FFFFFF at 10.07:1 contrast (WCAG AA passes).

Color values

HEX#512B8E
RGBrgb(81, 43, 142)
HSLhsl(263, 54%, 36%)
HSVhsv(263, 70%, 56%)
CMYKcmyk(43%, 69.7%, 0%, 44.3%)
CIE-LABlab(27.93, 39.72, -48.59)
CIE-LCHlch(27.93, 62.76, 309.27°)
OKLaboklab(39.61% 0.0683 -0.1388)
OKLCHoklch(39.61% 0.155 296.2)
XYZxyz(9.1384, 5.4299, 26.1525)
Luminance0.0543 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512B8E #688E2B
analogous
#2B378E #512B8E #832B8E
triadic
#512B8E #8E512B #2B8E51
tetradic
#512B8E #8E2B37 #688E2B #2B8E83
square
#512B8E #8E2B37 #688E2B #2B8E83
split-complementary
#512B8E #8E832B #378E2B
monochromatic
#1B0F30 #361D5F #512B8E #6C39BD #8D63D0

Accessibility & contrast

On white

10.07
#512B8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.09
#512B8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512B8E
10.07:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512B8E#FFFFFF#000000##FFFFFF
##512B8E1.0010.072.0910.07
#FFFFFF10.071.0021.001.00
#0000002.0921.001.0021.00
##FFFFFF10.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004291
Deuteranopia (green-blind)
#00418C
Tritanopia (blue-blind)
#414359
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512b8e;
/* rgb */ color: rgb(81, 43, 142);
/* oklch */ color: oklch(39.6% 0.155 296.2);
Tailwind
colors: {
  custom: {
    50: '#8767b0',
    500: '#512b8e',
    950: '#000000',
  },
}
SCSS
$custom: #512b8e;
$custom-light: #8767b0;
$custom-dark: #000000;
JSON
{
  "hex": "#512b8e",
  "rgb": {
    "r": 81,
    "g": 43,
    "b": 142
  },
  "hsl": {
    "h": 263.03,
    "s": 53.514,
    "l": 36.275
  },
  "oklch": {
    "l": 0.3961,
    "c": 0.15469,
    "h": 296.2
  },
  "luminance": 0.0543
}

Semantic roles & 50–950 ramp

primary
#512B8E
secondary
#95B65F
accent
#DD4BA5
background
#F8F6FA
surface
#F0EBF5
border
#CBC6CF
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #512B8E

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

Preview Lab → · Contrast checker → · Palette generator →

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