Khaki Color Code: Hex #F0E68C
The hex code for Khaki is #F0E68C (the CSS keyword khaki). Khaki RGB code: rgb(240, 230, 140). The xkcd color survey gives #AAA662 instead, which looks clearly different; both codes are below with their source.
#F0E68CTop: the code browsers use#AAA662Below: compare edge to edgeKhaki color codes: each Khaki hex code in every format
Sources
Properties
- Hex codes
- 3 different ones in 3 color lists; they look clearly different
- Family
- yellow
- Contrast
- 1.28:1 with white, 16.40:1 with black
- CSS keyword
- khaki
- Character
- very light, moderately saturated
- Readable text on it
- black (AA)
The first recorded use of khaki as a color name in English dates from 1848.
A very light, moderately saturated yellow with a warm cast. In code, khaki gives exactly this web value. If you mean the color as people usually picture the name, the survey value #AAA662 is closer: it is darker and more muted.
Black text reads best on it; white text does not pass WCAG AA. Its exact opposite on the color wheel cannot be shown on screens, so the complementary palette uses the closest displayable version. Even pale tints keep its hue, which makes it easy to use for soft backgrounds. Next to Pastel Yellow, its closest named neighbour, it looks darker, more muted and cooler; beside Cream it looks darker, more vivid and warmer.
Colors that go with Khaki
Complementary: the opposite of Khaki
#F0E68CBlack text 16.40:1#DEDFFFBlack text 16.10:1#F6F2C2Black text 18.40:1#898A9EBlack text 6.19:1
Analogous
#FFDCB1Black text 16.12:1#F0E68CBlack text 16.40:1#C6F3A5Black text 16.76:1#F9F6D3Black text 19.15:1
Triadic
#F0E68CBlack text 16.40:1#B9ECFFBlack text 16.51:1#FFD4EDBlack text 15.89:1#FBF9E4Black text 19.77:1
Monochrome
#434023White text 10.52:1#958E55Black text 6.28:1#F0E68CBlack text 16.40:1#F4EEB1Black text 17.71:1#F9F6D3Black text 19.15:1
With neutrals
#F0E68CBlack text 16.40:1#FBF9E4Black text 19.77:1#1F1D0DWhite text 16.94:1#A09E86Black text 7.73:1
Preview
Heading on Khaki
Body text on this color, 16.40:1.
ButtonHeading in Khaki
Text in this color on white, 1.28:1.
ButtonTints and shades
#FBF9E4#F9F6D3#F6F2C2#F4EEB1#F2EA9F#F0E68C#C1B970#958E55#6A663B#434023#1F1D0D
WhiteKhakiBlack
Similar named colors
Where the name comes from
- Source: Wikipedia, “Shades of brown” (checked 2 Nov 2026)
- Listed in CSS Color 4, xkcd color survey, meodai color-name-list. About these lists.
Try it: