A medium violet, black text passes AA
What color is mediumpurple?
The CSS named color mediumpurple is #9370db, or rgb(147 112 219): a medium violet in plain words. Black text on it reaches 5.58:1, passing WCAG AA, and Recolor (recolor.page) can put it on a real page.
Last updated
| Format | Value |
|---|---|
| Keyword | mediumpurple |
| Hex | #9370db |
| RGB | rgb(147 112 219) |
| HSL | hsl(260 60% 65%) |
| OKLCH | oklch(62.7% 0.158 296.7) |
| Nearest Tailwind color | indigo-400 #7c86ff, 0.074 away in OKLab |
| White text | 3.76:1: AA fails, AAA fails, large text passes |
| Black text | 5.58:1: AA passes, AAA fails, large text passes |
About mediumpurple
A medium violet is the plain description of mediumpurple: OKLCH lightness 62.7%, chroma 0.158, hue 296.7 degrees.
Here HSL's lightness, 65%, lands near OKLCH's 62.7%, which is not true of every color. No CSS keyword matches it; mediumslateblue (#7b68ee) is the nearest, 0.054 away in OKLab, a clear step off.
Black text on mediumpurple reaches 5.58:1, enough for WCAG AA body text but short of AAA's 7:1; white text gets 3.76:1. Its neighbors in the hue-sorted list of names are midnightblue and darkorchid.
The closest Tailwind 4.3.3 color is indigo-400, 0.074 away in OKLab, so bg-indigo-400 comes near; bg-[#9370db] gives the color itself.
Tints and shades
- #ece7fb
- #d9d0f5
- #c7b8f0
- #b5a0e9
- #a488e2
- #9370db
- #7256ac
- #533e7e
- #362754
- #1b122d
- #04020b
From light to dark: 5 toward white and 5 toward black, mixed in OKLCH a sixth of the way at a time with the hue kept. A step that would repeat its neighbor is left out.
A palette around it
- #9370db
- #e4deff
- #211f31
- #c8b9fc
- #5a477f
Recolor's generator, with mediumpurple locked as swatch 1 and the seed taken from its hex, drew a monochromatic palette, one hue in five lightnesses: #e4deff, #211f31, #c8b9fc, #5a477f. Open it in Recolor.
Using mediumpurple
As a text color, mediumpurple on a black page gives the same 5.58:1.
.notice {
background-color: mediumpurple; /* #9370db */
color: black; /* 5.58:1 */
}Common questions
Does white text pass WCAG AA on mediumpurple?
No. White text measures 3.76:1 on mediumpurple, under AA's 4.5:1; black text measures 5.58:1 and passes.
Can mediumpurple be written in OKLCH?
Yes: oklch(62.7% 0.158 296.7), computed from #9370db. A named color is an sRGB color, so its OKLCH value converts back to the same hex.
Is there a named color close to mediumpurple?
No. The nearest, mediumslateblue (#7b68ee), is 0.054 away in OKLab, a different color.