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

#9370dbmediumpurple
The keyword's value in CSS Color 4 (culori's list of named colors), converted with Recolor's color code, October 9, 2026
FormatValue
Keywordmediumpurple
Hex#9370db
RGBrgb(147 112 219)
HSLhsl(260 60% 65%)
OKLCHoklch(62.7% 0.158 296.7)
Nearest Tailwind colorindigo-400 #7c86ff, 0.074 away in OKLab
White text3.76:1: AA fails, AAA fails, large text passes
Black text5.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

  1. #ece7fb
  2. #d9d0f5
  3. #c7b8f0
  4. #b5a0e9
  5. #a488e2
  6. #9370db
  7. #7256ac
  8. #533e7e
  9. #362754
  10. #1b122d
  11. #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

  1. #9370db
  2. #e4deff
  3. #211f31
  4. #c8b9fc
  5. #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.

CSS
.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.

Sources