A vivid medium violet, white text passes AA
What color is blueviolet?
The CSS named color blueviolet is #8a2be2, or rgb(138 43 226): a vivid medium violet in plain words. White text on it reaches 5.96:1, passing WCAG AA, and Recolor (recolor.page) can put it on a real page.
Last updated
| Format | Value |
|---|---|
| Keyword | blueviolet |
| Hex | #8a2be2 |
| RGB | rgb(138 43 226) |
| HSL | hsl(271 76% 53%) |
| OKLCH | oklch(53.4% 0.250 301.4) |
| Nearest Tailwind color | purple-700 #8200db, 0.038 away in OKLab |
| White text | 5.96:1: AA passes, AAA fails, large text passes |
| Black text | 3.52:1: AA fails, AAA fails, large text passes |
About blueviolet
Measured in OKLCH, blueviolet comes out at lightness 53.4%, chroma 0.250 and hue 301.4 degrees: a vivid medium violet.
Here HSL's lightness, 53%, lands near OKLCH's 53.4%, which is not true of every color. Of the named colors, darkviolet (#9400d3) is the nearest, 0.043 away in OKLab; next to each other the two still differ.
White is the ink for blueviolet: 5.96:1 passes AA for body text, where black stops at 3.52:1. Its neighbors in the hue-sorted list of names are darkorchid and darkviolet.
The closest Tailwind 4.3.3 color is purple-700, 0.038 away in OKLab, so bg-purple-700 comes near; bg-[#8a2be2] gives the color itself.
Tints and shades
- #eadffd
- #d5c0fa
- #c1a0f6
- #ae7ff0
- #9c5aea
- #8a2be2
- #6b1fb1
- #4e1483
- #320a57
- #18032f
- #04000c
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
- #8a2be2
- #b1d6b2
- #28143a
- #a27700
- #fbecff
Around blueviolet as swatch 1, Recolor's generator made a split-complementary palette, built on the two hues beside its opposite: #b1d6b2, #28143a, #a27700, #fbecff, drawn from a seed fixed by its hex. Open it in Recolor.
Using blueviolet
As a text color, blueviolet on a white page gives the same 5.96:1.
.notice {
background-color: blueviolet; /* #8a2be2 */
color: white; /* 5.96:1 */
}Common questions
Does white text pass WCAG AA on blueviolet?
Yes. White text measures 5.96:1 on blueviolet, above the 4.5:1 that WCAG AA asks of body text.
Can blueviolet be written in OKLCH?
Yes: oklch(53.4% 0.250 301.4), computed from #8a2be2. A named color is an sRGB color, so its OKLCH value converts back to the same hex.
Is there a named color close to blueviolet?
Yes: darkviolet (#9400d3) is the nearest, 0.043 away in OKLab, then darkorchid at 0.049.