CSS named color
MediumPurple #9370DB
MediumPurple is a violet with the hex code #9370DB, which converts to rgb(147, 112, 219). Open #9370DB in the converter to tweak it.
MediumPurple color values
| HEX | #9370DB |
|---|---|
| HEX (shorthand) | — |
| RGB | rgb(147, 112, 219) |
| RGBA | rgba(147, 112, 219, 1) |
| 8-digit HEX | #9370DBFF |
| HSL | hsl(260, 60%, 65%) |
| HSV / HSB | 260°, 49%, 86% |
| CMYK | 33%, 49%, 0%, 14% |
| RGB 0–1 | 0.576, 0.439, 0.859 |
| Decimal | 9662683 |
| CSS keyword | mediumpurple |
How #9370DB converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: 93 → 147, 70 → 112, DB → 219. That gives rgb(147, 112, 219). The step-by-step guide explains the math.
Shades of MediumPurple
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of MediumPurple
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of MediumPurple on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Complementary
Analogous
Split-complementary
Triadic
Tetradic (square)
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | MediumPurple | 3.76:1 | AA Large only |
| Black | MediumPurple | 5.58:1 | AA |
Use black text on a mediumpurple background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use MediumPurple in CSS
.element {
color: mediumpurple; /* keyword */
background-color: #9370DB; /* hex */
border-color: rgb(147 112 219 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #9370DB80 is MediumPurple at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for MediumPurple?
The CSS named color mediumpurple is #9370DB in hexadecimal. In CSS you can write color: mediumpurple; or color: #9370DB; — both produce the same pixel.
What is MediumPurple in RGB?
MediumPurple is rgb(147, 112, 219): red 147, green 112, blue 219 on the 0–255 scale. As normalized 0–1 floats that is (0.576, 0.439, 0.859).
Is white or black text more readable on MediumPurple?
Black text is more readable. White on #9370DB has a contrast ratio of 3.76:1 (AA Large only), black on #9370DB has 5.58:1 (AA). WCAG AA needs 4.5:1 for normal text.