About Yellow Green
Yellow Green (yellowgreen) is a medium, vivid green with the hex code #9acd32, or rgb(154, 205, 50). In HSL it sits at a hue of 80°, 61% saturation and 50% lightness. It is one of the 148 named colors every browser understands, so you can write color: yellowgreen; instead of the hex value.
Using Yellow Green for text and backgrounds
| Pairing | Contrast ratio | WCAG |
|---|---|---|
| Yellow Green text on white | 1.88 : 1 | fails |
| Yellow Green text on black | 11.15 : 1 | AAA |
On a yellow green background, use black text (11.15 : 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: yellowgreen; /* or #9acd32 */
background-color: #9acd32;
border: 1px solid rgb(154 205 50 / 50%);
}
Similar named colors
Green Yellow (#adff2f), Dark Khaki (#bdb76b), Lawn Green (#7cfc00), Chartreuse (#7fff00), Goldenrod (#daa520), Olive Drab (#6b8e23).