#512DA8

#512DA8 — Color Codes & Palette

#512DA8  ·  rgb(81, 45, 168)  ·  hsl(258, 58%, 42%)

Color Codes

Format Value
HEX #512DA8
RGB rgb(81, 45, 168)
HSL hsl(258, 58%, 42%)

Shades of #512DA8

#4A2999#432489#3B2079#331C69#2B1859#231349#1B0F38#140B28

Tints of #512DA8

#5E33C1#6E46CE#815ED4#9476DB#A78EE1#BAA6E7#CDBFEE#E0D7F4

Color Pairings & Harmony

Complementary
#84A92D
Analogous +30°
#902DA9
Analogous −30°
#2D46A9
Triadic +120°
#A9522D
Triadic −120°
#2DA952

Contrast & Accessibility (WCAG 2.1)

vs. White (#FFFFFF)
9.17:1 — AAA pass for normal text
vs. Black (#000000)
2.29:1 — Fail

CSS Snippet

.element {
  color: #512DA8;
}

.element-bg {
  background-color: #512DA8;
  color: #ffffff;
}

.element-border {
  border: 2px solid #512DA8;
}

About #512DA8

#512DA8 is a medium color with high saturation, defined by the hex code #512DA8. Its exact color model values are rgb(81, 45, 168) in RGB and hsl(258, 58%, 42%) in HSL (hue 258°, saturation 58%, lightness 42%). On a white background the contrast ratio is 9.17:1 — AAA pass for normal text, and on black it is 2.29:1 — Fail. Use #512DA8 for UI elements, backgrounds, text, borders, or decorative accents. The shades section below shows progressively darker variations, while the tints strip shows progressively lighter versions — both useful for building a tonal palette. The harmony swatches provide complementary, analogous, and triadic pairings based on the HSL hue wheel.

Want to explore this color interactively, generate palettes, or convert between color formats? The DevArbor Color Picker has you covered.

Open the Color Picker →

Frequently Asked Questions

What is the RGB value of #512DA8?
The RGB value of #512DA8 (#512DA8) is rgb(81, 45, 168). Red = rgb(81, 45, 168), representing the amounts of red, green, and blue light on a 0–255 scale.
Is #512DA8 accessible on a white background?
The contrast ratio of #512DA8 on white (#FFFFFF) is 9.17:1 — AAA pass for normal text. On black (#000000) the contrast ratio is 2.29:1 — Fail. WCAG 2.1 requires 4.5:1 for AA (normal text) and 7:1 for AAA.
What colors pair well with #512DA8?
Based on color theory, #512DA8 (hsl(258, 58%, 42%)) pairs well with its complementary, analogous, and triadic hues. See the harmony swatches above for the exact hex values of each pairing type.