#512787 color
The hex color #512787 is a dark, moderate violet.
In the RGB color model it is made of 31.8% red, 15.3% green and 52.9% blue (81, 39, 135).
Its hue angle is 266°, with 55% saturation and 34% lightness. For print, the CMYK equivalent is 40% cyan, 71% magenta, 0% yellow and 47% black.
The closest named color is Night Fever (#572E89), a difference of 1.9 ΔE, which is barely visible.
White text is the more readable choice on this background (contrast 10.55:1).
#512787 color codes
| HEX | #512787 | |
|---|---|---|
| RGB | rgb(81, 39, 135) | |
| RGB percent | rgb(31.8%, 15.3%, 52.9%) | |
| HSL | hsl(266, 55%, 34%) | |
| HSV / HSB | hsv(266, 71%, 53%) | |
| CMYK | cmyk(40%, 71%, 0%, 47%) | |
| CIE LAB | lab(26.59, 39.94, -46.41) | |
| CIE LCH | lch(26.59, 61.23, 310.71) | |
| CIE XYZ | xyz(8.491, 4.95, 23.425) | |
| Decimal | 5318535 | |
| Short hex | None (no 3-digit form) |
Color harmonies
Colors that go with #512787, based on their position on the color wheel.
Complementary
The color opposite on the color wheel (180°). Strongest contrast.
Analogous
Neighbors 30° either side. Calm, natural combinations.
Split complementary
The two colors next to the complement (150° and 210°).
Triadic
Three colors evenly spaced, 120° apart.
Tetradic (square)
Four colors 90° apart.
Shades, tints and tones
Shades (darker, mixed with black)
Tints (lighter, mixed with white)
Tones (mixed with gray)
Contrast and accessibility
| Text on #512787 | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 1.99:1 | Fail | Fail | Fail |
| Sample text | 10.55:1 | Pass | Pass | Pass |
| #512787 as text on | Ratio | AA | AAA | AA large |
|---|---|---|---|---|
| Sample text | 10.55:1 | Pass | Pass | Pass |
| Sample text | 1.99:1 | Fail | Fail | Fail |
WCAG 2 asks for 4.5:1 for normal text (AA), 7:1 for AAA, and 3:1 for large text. Check other pairs.
Color blindness simulation
How #512787 looks to people with the most common types of color vision deficiency.
#003f8aProtanopia
no red cones#003e85Deuteranopia
no green cones#443e54Tritanopia
no blue cones#3f3f3fAchromatopsia
no color vision
CSS examples
.background { background-color: #512787; }
.text { color: #512787; }
.border { border: 2px solid #512787; }
.transparent { background-color: rgb(81 39 135 / 50%); }
.gradient { background: linear-gradient(to right, #512787, #812787); }
Similar colors
#572e89Night Fever#4b1e87Occult#5b1e8bIntergalactic Settlement#442288Galactic Civilization#5c2e88Purple Patch#632f92Lucid Dreams#472e97Galactic Purple#4b2c74Mystic Nights
Closest common color name: Rebecca Purple.
Questions
- What color is #512787?
- #512787 is a dark, moderate violet, closest to the named color Night Fever. It belongs to the purple family of colors.
- What is the RGB value of #512787?
- The RGB value is 81, 39, 135: 81 red, 39 green and 135 blue on a 0 to 255 scale.
- What is the complementary color of #512787?
- The complementary color is #5D8727, found by rotating the hue 180° on the color wheel.
- Is black or white text better on #512787?
- White text. Black text has a contrast ratio of 1.99:1 and white text 10.55:1. WCAG asks for at least 4.5:1 for normal text.