cornsilk — #FFF8DC
#FFF8DC
rgb(255, 248, 220) · hsl(48, 100%, 93%) · CSS keyword cornsilk
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| cornsilk on white | 1.07:1 | — | — |
| cornsilk on black | 19.71:1 | AA | AA |
As a background, cornsilk takes black text: 19.71:1 against 1.07:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.
Using it
color: cornsilk;
color: #fff8dc;
color: rgb(255 248 220);
All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.
Colours close to cornsilk
- oldlace — #FDF5E6
- lightgoldenrodyellow — #FAFAD2
- lemonchiffon — #FFFACD
- lightyellow — #FFFFE0
- beige — #F5F5DC
- seashell — #FFF5EE
Frequently asked questions
What is the hex code for cornsilk?
The hex code for cornsilk is #FFF8DC — RGB 255, 248, 220.
Can I use cornsilk for text?
Not on a white background. cornsilk reaches only 1.07:1, and WCAG AA asks for 4.5:1. It works as a background or a border, not as ink.
Should text on cornsilk be black or white?
Black — 19.71:1 against 1.07:1 the other way.
Other named colours
- crimson — #DC143C
- cyan — #00FFFF
- darkblue — #00008B
- darkcyan — #008B8B
- darkgoldenrod — #B8860B
- darkgray — #A9A9A9
- darkgreen — #006400
- darkkhaki — #BDB76B
- darkmagenta — #8B008B
- darkolivegreen — #556B2F
- darkorange — #FF8C00
- darkorchid — #9932CC
#FFF8DC in full — tints, shades and harmonies · All named colours · Colour reference