#512795#512795

#512795 is a dark, vivid violet. Relative luminance 0.054; OKLCH L 39.7% C 0.168 H 295.0°. Best body text is #FFFFFF at 10.13:1 contrast (WCAG AA passes).

Color values

HEX#512795
RGBrgb(81, 39, 149)
HSLhsl(263, 59%, 37%)
HSVhsv(263, 74%, 58%)
CMYKcmyk(45.6%, 73.8%, 0%, 41.6%)
CIE-LABlab(27.76, 43.75, -53.17)
CIE-LCHlch(27.76, 68.85, 309.45°)
OKLaboklab(39.68% 0.071 -0.1522)
OKLCHoklch(39.68% 0.168 295)
XYZxyz(9.5422, 5.3700, 28.9617)
Luminance0.0537 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#512795 #6B9527
analogous
#273495 #512795 #882795
triadic
#512795 #955127 #279551
tetradic
#512795 #952734 #6B9527 #279588
square
#512795 #952734 #6B9527 #279588
split-complementary
#512795 #958827 #349527
monochromatic
#1C0E34 #371A64 #512795 #6B34C6 #8D61D6

Accessibility & contrast

On white

10.13
#512795 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.07
#512795 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #512795
10.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##512795#FFFFFF#000000##FFFFFF
##5127951.0010.132.0710.13
#FFFFFF10.131.0021.001.00
#0000002.0721.001.0021.00
##FFFFFF10.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004298
Deuteranopia (green-blind)
#004093
Tritanopia (blue-blind)
#3E435B
Achromatopsia (no color)
#424242

Design tokens & code

CSS
--color: #512795;
/* rgb */ color: rgb(81, 39, 149);
/* oklch */ color: oklch(39.7% 0.168 295.0);
Tailwind
colors: {
  custom: {
    50: '#8865b5',
    500: '#512795',
    950: '#000000',
  },
}
SCSS
$custom: #512795;
$custom-light: #8865b5;
$custom-dark: #000000;
JSON
{
  "hex": "#512795",
  "rgb": {
    "r": 81,
    "g": 39,
    "b": 149
  },
  "hsl": {
    "h": 262.909,
    "s": 58.511,
    "l": 36.863
  },
  "oklch": {
    "l": 0.39678,
    "c": 0.16799,
    "h": 295
  },
  "luminance": 0.0537
}

Semantic roles & 50–950 ramp

primary
#512795
secondary
#97BB5D
accent
#E246A6
background
#F8F6FB
surface
#F0EBF6
border
#CBC6D0
text
#0C0611
muted
#7D7A80

Preview Lab

Preview with #512795

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

Preview Lab → · Contrast checker → · Palette generator →

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