100% free no uploads no sign-up

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”.

#F0E68Ckhaki
White text: 1.28:1 ✗Black text: 16.40:1 ✓ AANearest name: khaki

Move the sliders to find a lighter, darker or softer khaki; the codes update as you go.

Khaki colour codes

HEX#F0E68C
RGBrgb(240, 230, 140)
HSLhsl(54, 77%, 75%)
HSV / HSBhsv(54, 42%, 94%)
CMYKcmyk(0%, 4%, 42%, 6%)
Decimal15787660
CSS keywordkhaki

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.

#FEFDF4#FCFAE8#FBF8DD#F9F5D1#F8F3C6#F6F0BA#F5EEAF#F3EBA3#F2E998
khaki #F0E68C
#D8CF7E#C0B870#A8A162#908A54#787346#605C38#48452A#302E1C#18170E

Colours that go with khaki

Complementary — opposite on the colour wheel: maximum contrast

#F0E68C#8C96F0

Analogous — neighbours 30° either side: calm and natural

#F0B48C#F0E68C#C8F08C

Triadic — three hues 120° apart: lively but balanced

#F0E68C#8CF0E6#E68CF0

Split complementary — the two neighbours of the complement: contrast with less tension

#F0E68C#8CC8F0#B48CF0

Tetradic — four hues 90° apart: rich, use one as the main colour

#F0E68C#8CF0B4#8C96F0#F08CC8

Khaki text contrast

CombinationRatioAA normal (4.5:1)AA large (3:1)AAA (7:1)
khaki on white1.28:1failfailfail
khaki on black16.4:1passpasspass

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.

normal #F0E68Cprotanopia #F5E185deuteranopia #F8E690tritanopia #FDDBD0

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.

Colours similar to khaki