Skip to content

Cornsilk

Hex #FFF8DC, rgb(255 248 220). A white CSS named color.

Open in palette generator

Cornsilk color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Cornsilk

Cornsilk is a very light near-white with the hex code #FFF8DC. In RGB it is made of 255 red, 248 green and 220 blue; in HSL its hue is 48°, with 100% saturation and 93% lightness. Its perceptual lightness (OKLCH L) is 97.7%.

It is a CSS named color, so you can write "cornsilk" anywhere CSS accepts a color. Against white it has a contrast ratio of 1.07:1 and against black 19.71:1, so black text reads better on it and passes WCAG AA for normal text.

Tints, shades and tones

Cornsilk mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Cornsilk 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Cornsilk

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Square

Monochromatic

Contrast and readability

WCAG 2 contrast of Cornsilk with white and black. The readable text color on Cornsilk is black.

Cornsilk textSmall text on white

On white1.07:1

  • AA fail
  • AA Large fail
  • AAA fail
  • UI 3:1 fail

APCA Lc 0

Cornsilk textSmall text on black

On black19.71:1

  • AA pass
  • AA Large pass
  • AAA pass
  • UI 3:1 pass

APCA Lc -103

Black text on Cornsilk (#000000)

Test any pair in the contrast checker.

Color blindness preview

How Cornsilk appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#FEF6DA
  • Deuteranopia#FFF9DD
  • Tritanopia#FFF4F0
  • Protanomaly#FFF7DB
  • Deuteranomaly#FFF8DD
  • Tritanomaly#FFF6E5
  • Achromatopsia#F8F8F8

Colors similar to Cornsilk

The closest named colors by perceptual difference (OKLab).

Use Cornsilk in CSS and Tailwind

CSS
.cornsilk {
  color: cornsilk; /* #FFF8DC */
  background-color: rgb(255 248 220);
  border-color: oklch(97.7% 0.037 95.4);
}
Tailwind CSS
/* Tailwind CSS v4: bg-cornsilk-500, text-cornsilk-700... */
@theme {
  --color-cornsilk-50: #FFF8DC;
  --color-cornsilk-100: #FCEBAA;
  --color-cornsilk-200: #F9D746;
  --color-cornsilk-300: #DEBB00;
  --color-cornsilk-400: #B59800;
  --color-cornsilk-500: #9C8200;
  --color-cornsilk-600: #856F00;
  --color-cornsilk-700: #6B5900;
  --color-cornsilk-800: #564700;
  --color-cornsilk-900: #463A00;
  --color-cornsilk-950: #1C1600;
}

<!-- or the exact color, no config -->
<div class="bg-[#FFF8DC] text-[#000000]">…</div>