Skip to content
ColorPlum

Colors · value from the CSS Color Module Level 4 (W3C)

Khaki color: hex code #F0E68C, RGB and palettes

Khaki is #F0E68C (RGB 240, 230, 140), the CSS named color: a light, soft yellow. Dark text works well on it, with black at 16.40:1, but it is only 1.28:1 as text on white.

ColorPlum swatchKhakilight, saturated yellow
HEX
#F0E68C
RGB
rgb(240, 230, 140)
HSL
hsl(54, 77%, 75%)

Best text on it: black at 16.40:1

Copy codes as

Every code for Khaki

  • HEX#F0E68C
  • RGBrgb(240, 230, 140)
  • HSLhsl(54, 77%, 75%)
  • HSV54°, 42%, 94%
  • CMYK0%, 4%, 42%, 6%
  • Lablab(90.6% -5.6 45)
  • OKLCHoklch(91.3% 0.112 102.8)
  • Decimal15787660

Tints, shades and tones

From white to black in 10% steps, with Khaki in the middle. Tap a code to copy it.

  1. 90%#FEFDF4
  2. 80%#FCFAE8
  3. 70%#FBF8DD
  4. 60%#F9F5D1
  5. 50%#F8F3C6
  6. 40%#F6F0BA
  7. 30%#F5EEAF
  8. 20%#F3EBA3
  9. 10%#F2E998
  10. Base#F0E68C
  11. 10%#D8CF7E
  12. 20%#C0B870
  13. 30%#A8A162
  14. 40%#908A54
  15. 50%#787346
  16. 60%#605C38
  17. 70%#48452A
  18. 80%#302E1C
  19. 90%#18170E

Tones (mixed with gray)

  1. 10%#E5DC8B
  2. 20%#DAD28A
  3. 30%#CEC788
  4. 40%#C3BD87
  5. 50%#B8B386
  6. 60%#ADA985
  7. 70%#A29F84
  8. 80%#969482
  9. 90%#8B8A81

Matching colors

Complementary
Analogous
Triadic
Split complementary
Tetradic (square)
Monochromatic
  • #C9B71A
  • #E7D748
  • #F0E68C
  • #F9F5D0
  • #FDFBED

Khaki in 3D color space

OKLab, the space ColorPlum does its math in: lightness runs up the pole, hue goes around it and saturation grows outward. The faint shell is every color a screen can show (saturation is drawn wider than lightness so hues separate). Drag to turn it.

Khaki with its complement, its triad and its tint and shade
  • Khaki
  • Triad #8CF0E6
  • Triad #E68CF0
  • Complement
  • 50% tint
  • 50% shade

Khaki in use

New collectionAutumn edit

Card body text stays dark for reading; khaki carries the header and the button.

Shop nowTag

Headline in Khaki

A paragraph with a link in dark text, because this color is too light for text on white; use it for fills instead.

How it looks with color-vision deficiency

A simulation (Machado and colleagues, 2009) of how the color and its complement read without one type of cone.

  • Typical color vision#F0E68C
  • Protanopia (no red cones)#F5E085
  • Deuteranopia (no green cones)#F8E690
  • Tritanopia (no blue cones)#FDDBD0

Contrast and readability

PairingRatioWCAG 2.2
as text on white1.28:1AA AA large AAA
as text on black16.40:1AA AA large AAA
white text on it1.28:1AA AA large AAA
black text on it16.40:1AA AA large AAA
on your background1.11:1AA AA large AAA

Export

:root {
  --khaki: #f0e68c;
  --khaki-rgb: 240 230 140;
  --khaki-on: #000000;
}
On this page

Khaki comes from a word meaning dust or earth in Hindi and Urdu, and it became the name of the dull tan cloth used in military uniforms. That is not the color you get in CSS. The CSS named color khaki is #F0E68C, a light and fairly yellow shade, much brighter than the fabric.

CSS khaki versus the survey

The RGB values are 240, 230, 140: high red and green with blue held back. HSL gives hue 54°, 77% saturation, 75% lightness. CMYK reads 0%, 4%, 42%, 6%, and the decimal form is 15787660.

If you picture trousers, you probably mean something else. The xkcd survey's "khaki" is #AAA662, a dull olive-tan, and it sits 20.2 away from the CSS value in OKLab, one of the largest gaps between the two lists. The CSS version has nearest neighbors in palegoldenrod (#EEE8AA, 3.3 away), navajowhite (5.6) and moccasin (5.7). The survey's yellows "wheat" (#FBDD7E) and "sandy" (#F1DA7A) are closest at 2.5 and 3.0. So you have two real choices, and the code decides which one you get.

Contrast and companions

  • Text on khaki: black gives 16.40:1. A dark olive such as #302E1C measures 10.69:1, and #48452A gives 7.59:1. The medium shade #605C38 reaches 5.31:1.
  • Khaki as text: on white it is 1.28:1, so it should only be a fill. On black it works well at 16.40:1.
  • Companions: the complement is a periwinkle, #8C96F0, and the triadic partners are #8CF0E6 and #E68CF0. A softer analogous set runs from peach (#F0B48C) to lime (#C8F08C).

The tints fade from #F2E998 to #FEFDF4 and the shades darken through #A8A162 to #18170E.

Worked example

Your hiking club is writing its autumn newsletter and wants a field-guide look. The header band is khaki with the club name in the deep olive #302E1C at 10.69:1. Body copy sits on a lighter tint, #FCFAE8, in the same olive for 13.03:1. Trail ratings use the mid olive #605C38 on white for 6.80:1. You test white lettering on the mid olive for the sidebar and find that it gives the same 6.80:1, so it also passes. Because pure khaki on white is just 1.28:1, you never use khaki for text or thin lines.

For related soft yellows see lemon chiffon, and for a duller tan, tan and beige. Seasonal sets that use warm neutrals are in the fall color palettes.

Sources

  1. W3C, CSS Color Module Level 4: named colors (checked 2026-11-10) w3.org
  2. xkcd, Color survey results: the 954 most common color names (Randall Munroe, 2010; checked 2026-11-10) xkcd.com
  3. W3C, Web Content Accessibility Guidelines (WCAG) 2.2: contrast minimum (checked 2026-11-10) w3.org