About Corn Silk
Corn Silk (cornsilk) is a very light, vivid yellow with the hex code #fff8dc, or rgb(255, 248, 220). In HSL it sits at a hue of 48°, 100% saturation and 93% lightness. It is one of the 148 named colors every browser understands, so you can write color: cornsilk; instead of the hex value.
Using Corn Silk for text and backgrounds
| Pairing | Contrast ratio | WCAG |
|---|---|---|
| Corn Silk text on white | 1.07 : 1 | fails |
| Corn Silk text on black | 19.71 : 1 | AAA |
On a corn silk background, use black text (19.71 : 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: cornsilk; /* or #fff8dc */
background-color: #fff8dc;
border: 1px solid rgb(255 248 220 / 50%);
}
Similar named colors
Light Yellow (#ffffe0), Beige (#f5f5dc), Old Lace (#fdf5e6), Light Goldenrod Yellow (#fafad2), Papaya Whip (#ffefd5), Linen (#faf0e6).