White on khakiBlack on khaki

Shades to explore

YELLOW FAMILY

Khaki colour code

#F0E68C

Khaki (#F0E68C) is a pale, vivid shade in the yellow family. Its HSL lightness is 75% and saturation is 77%.

HEX#F0E68C
RGBrgb(240, 230, 140)
HSLhsl(54, 77%, 75%)

Text contrast

With white: 1.28:1 · With black: 16.40:1

Normal text needs 4.5:1 for AA; large text needs 3:1.

Use Khaki in CSS

Copy this background and text pairing into your stylesheet.

.colour-khaki {
  background-color: #F0E68C;
  color: #000000;
}

Use the HEX value for a consistent digital reference. Descriptive colour names can vary between collections and are not always valid CSS keywords. This code does not identify a paint, fabric or print specification.

Using Khaki

Try it for highlights and callouts, checking text contrast especially carefully on lighter shades.

Black text on Khaki

16.40:1 · AAA for normal text

This pairing uses #000000 text on #F0E68C. Results apply to solid colours; recheck contrast if you add transparency, imagery or effects.

Colour companions

Similar shades in the yellow family