CSS named color

Khaki #F0E68C

khaki rgb(240, 230, 140)

Khaki is a light yellow with the hex code #F0E68C, which converts to rgb(240, 230, 140). Open #F0E68C in the converter to tweak it.

Khaki color values

HEX#F0E68C
HEX (shorthand)—
RGBrgb(240, 230, 140)
RGBArgba(240, 230, 140, 1)
8-digit HEX#F0E68CFF
HSLhsl(54, 77%, 75%)
HSV / HSB54°, 42%, 94%
CMYK0%, 4%, 42%, 6%
RGB 0–10.941, 0.902, 0.549
Decimal15787660
CSS keywordkhaki

How #F0E68C converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: F0 → 240, E6 → 230, 8C → 140. That gives rgb(240, 230, 140). The step-by-step guide explains the math.

Shades of Khaki

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of Khaki

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of Khaki on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White Khaki 1.28:1Fail
Black Khaki 16.40:1AAA

Use black text on a khaki background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use Khaki in CSS

.element {
  color: khaki;                         /* keyword */
  background-color: #F0E68C;            /* hex */
  border-color: rgb(240 230 140 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #F0E68C80 is Khaki at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for Khaki?

The CSS named color khaki is #F0E68C in hexadecimal. In CSS you can write color: khaki; or color: #F0E68C; — both produce the same pixel.

What is Khaki in RGB?

Khaki is rgb(240, 230, 140): red 240, green 230, blue 140 on the 0–255 scale. As normalized 0–1 floats that is (0.941, 0.902, 0.549).

Is white or black text more readable on Khaki?

Black text is more readable. White on #F0E68C has a contrast ratio of 1.28:1 (Fail), black on #F0E68C has 16.40:1 (AAA). WCAG AA needs 4.5:1 for normal text.

Copied!