About Light Yellow
Light Yellow (lightyellow) is a very light, vivid yellow with the hex code #ffffe0, or rgb(255, 255, 224). In HSL it sits at a hue of 60°, 100% saturation and 94% lightness. It is one of the 148 named colors every browser understands, so you can write color: lightyellow; instead of the hex value.
Using Light Yellow for text and backgrounds
| Pairing | Contrast ratio | WCAG |
|---|---|---|
| Light Yellow text on white | 1.02 : 1 | fails |
| Light Yellow text on black | 20.63 : 1 | AAA |
On a light yellow background, use black text (20.63 : 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: lightyellow; /* or #ffffe0 */
background-color: #ffffe0;
border: 1px solid rgb(255 255 224 / 50%);
}
Similar named colors
Corn Silk (#fff8dc), Old Lace (#fdf5e6), Beige (#f5f5dc), Light Goldenrod Yellow (#fafad2), Ivory (#fffff0), Floral White (#fffaf0).