About Indigo
Indigo (indigo) is a dark, vivid purple with the hex code #4b0082, or rgb(75, 0, 130). In HSL it sits at a hue of 275°, 100% saturation and 25% lightness. It is one of the 148 named colors every browser understands, so you can write color: indigo; instead of the hex value.
Using Indigo for text and backgrounds
| Pairing | Contrast ratio | WCAG |
|---|---|---|
| Indigo text on white | 12.95 : 1 | AAA |
| Indigo text on black | 1.62 : 1 | fails |
On a indigo background, use white text (12.95 : 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: indigo; /* or #4b0082 */
background-color: #4b0082;
border: 1px solid rgb(75 0 130 / 50%);
}
Similar named colors
Purple (#800080), Midnight Blue (#191970), Dark Slate Blue (#483d8b), Rebecca Purple (#663399), Dark Magenta (#8b008b), Navy (#000080).