A pale yellow, black text passes AA
What color is cornsilk?
The CSS named color cornsilk is #fff8dc, or rgb(255 248 220): a pale yellow in plain words. Black text on it reaches 19.71:1, passing WCAG AAA, and Recolor (recolor.page) can put it on a real page.
Last updated
| Format | Value |
|---|---|
| Keyword | cornsilk |
| Hex | #fff8dc |
| RGB | rgb(255 248 220) |
| HSL | hsl(48 100% 93%) |
| OKLCH | oklch(97.7% 0.037 95.4) |
| Nearest Tailwind color | yellow-50 #fefce8, 0.015 away in OKLab |
| White text | 1.07:1: AA fails, AAA fails, large text fails |
| Black text | 19.71:1: AA passes, AAA passes, large text passes |
About cornsilk
In OKLCH terms cornsilk has a lightness of 97.7%, a chroma of 0.037 and a hue of 95.4 degrees, a pale yellow to the eye.
Here HSL's lightness, 93%, lands near OKLCH's 97.7%, which is not true of every color. The CSS keyword beige (#f5f5dc) is almost the same color: 0.016 apart in OKLab, under the step most people notice.
For text, cornsilk wants black: 19.71:1 clears even AAA's 7:1, and white at 1.07:1 fails AA. Its neighbors in the hue-sorted list of names are lemonchiffon and lightgoldenrodyellow.
The closest Tailwind 4.3.3 color is yellow-50, 0.015 away in OKLab, so bg-yellow-50 comes very close; bg-[#fff8dc] gives the color itself.
Tints and shades
- #fffef9
- #fffdf3
- #fffcee
- #fffae8
- #fff9e2
- #fff8dc
- #c8c3ac
- #94907f
- #636054
- #36342d
- #0f0e0b
From light to dark: 5 toward white and 5 toward black, mixed in OKLCH a sixth of the way at a time with the hue kept. A step that would repeat its neighbor is left out.
A palette around it
- #fff8dc
- #006645
- #65c7a7
- #00371e
- #378c72
Locked as the first of five swatches, cornsilk gets #006645, #65c7a7, #00371e, #378c72 from Recolor's generator, a monochromatic palette, one hue in five lightnesses. The seed is its hex, so the palette stays the same. Open it in Recolor.
Using cornsilk
As a text color, cornsilk on a black page gives the same 19.71:1.
.notice {
background-color: cornsilk; /* #fff8dc */
color: black; /* 19.71:1 */
}Common questions
Does white text pass WCAG AA on cornsilk?
No. White text measures 1.07:1 on cornsilk, under AA's 4.5:1; black text measures 19.71:1 and passes.
Can cornsilk be written in OKLCH?
Yes: oklch(97.7% 0.037 95.4), computed from #fff8dc. A named color is an sRGB color, so its OKLCH value converts back to the same hex.
Is there a named color close to cornsilk?
Yes: beige (#f5f5dc) is the nearest, 0.016 away in OKLab, then lightyellow at 0.017.