khaki color code
The hex code for khaki is #F0E68C, which is rgb(240, 230, 140) in RGB and cmyk(0%, 4%, 42%, 6%) in CMYK. It's a light, rich yellow. It is a built-in CSS colour, so you can also write it as “khaki”.
Build a full palette from it: open in the palette generator.
Move the sliders to find a lighter, darker or softer khaki; the codes update as you go.
Khaki colour codes
| HEX | #F0E68C |
|---|---|
| RGB | rgb(240, 230, 140) |
| HSL | hsl(54, 77%, 75%) |
| HSV / HSB | hsv(54, 42%, 94%) |
| CMYK | cmyk(0%, 4%, 42%, 6%) |
| Decimal | 15787660 |
| CSS keyword | khaki |
About khaki
Khaki sits at a hue of 54° on the colour wheel, with 77% saturation and 75% lightness. That makes it a warm colour: warm colours feel energetic and inviting and appear to come forward on a page.
For text, black reads better on khaki. Khaki as text on a white background has a contrast ratio of 1.28:1, which fails the WCAG AA rule for body text (4.5:1) and fails the 3:1 rule for large text. On black it is 16.4:1, which passes AA for body text.
Tints and shades of khaki
Tints mix khaki with white and shades mix it with black, in 10% steps. They're the easiest way to get lighter backgrounds and darker hover or text colours that still match.
Colours that go with khaki
Complementary — opposite on the colour wheel: maximum contrast
Analogous — neighbours 30° either side: calm and natural
Triadic — three hues 120° apart: lively but balanced
Split complementary — the two neighbours of the complement: contrast with less tension
Tetradic — four hues 90° apart: rich, use one as the main colour
Khaki text contrast
| Combination | Ratio | AA normal (4.5:1) | AA large (3:1) | AAA (7:1) |
|---|---|---|---|---|
| khaki on white | 1.28:1 | fail | fail | fail |
| khaki on black | 16.4:1 | pass | pass | pass |
Check khaki against any other colour in the contrast checker.
How khaki looks with colour blindness
Simulated with the Machado et al. (2009) model for the complete loss of one type of cone cell. Colour vision deficiency affects roughly 1 in 12 men and 1 in 200 women, most often as red-green colour blindness.
Use khaki in code
.khaki {
color: khaki;
background-color: #f0e68c;
border-color: rgb(240, 230, 140);
}Frequently asked questions
What is the hex code for khaki?
Khaki is #F0E68C (lowercase #f0e68c). It's the official value of the CSS keyword “khaki”.
What is khaki in RGB, HSL and CMYK?
RGB: rgb(240, 230, 140). HSL: hsl(54, 77%, 75%). CMYK: cmyk(0%, 4%, 42%, 6%). CMYK is a simple conversion for reference; for professional printing, ask your printer for a matching ink or Pantone swatch.
What colours go with khaki?
Its complementary colour is #8C96F0 (close to cornflower blue), which gives the strongest contrast. For a calmer look, use the analogous colours #F0B48C and #C8F08C, or the triadic pair #8CF0E6 and #E68CF0. Tints and shades of khaki itself always work together.
Is khaki a warm or cool colour?
Khaki has a hue of 54°, which makes it warm.
Should I use black or white text on khaki?
Black. Black text on khaki has a contrast ratio of 16.4:1 and white text has 1.28:1. WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.
How do I use khaki in CSS?
Write color: khaki; or color: #f0e68c; — both give the same colour. Named colours work in every browser.