About Lavender
Lavender (lavender) is a very light, vivid blue with the hex code #e6e6fa, or rgb(230, 230, 250). In HSL it sits at a hue of 240°, 67% saturation and 94% lightness. It is one of the 148 named colors every browser understands, so you can write color: lavender; instead of the hex value.
Using Lavender for text and backgrounds
| Pairing | Contrast ratio | WCAG |
|---|---|---|
| Lavender text on white | 1.23 : 1 | fails |
| Lavender text on black | 17.06 : 1 | AAA |
On a lavender background, use black text (17.06 : 1). WCAG asks for at least 4.5 : 1 for body text and 3 : 1 for large text. Check other pairs with the Contrast Checker.
CSS
.element {
color: lavender; /* or #e6e6fa */
background-color: #e6e6fa;
border: 1px solid rgb(230 230 250 / 50%);
}
Similar named colors
Alice Blue (#f0f8ff), White Smoke (#f5f5f5), Ghost White (#f8f8ff), Light Cyan (#e0ffff), Lavender Blush (#fff0f5), Azure (#f0ffff).