Yellow color · CSS named color

Khaki Color Code: #F0E68C

Khaki is a medium-light, vivid yellow color with the hexadecimal value #F0E68C. In RGB it is 240, 230, 140 and in HSL it is 54°, 77%, 75%. Black text reads best on it (16.40:1 contrast).

Khaki color values

HEX #F0E68C
RGB rgb(240, 230, 140)
HSL hsl(54, 77%, 75%)
HSV 54, 42%, 94%
HWB hwb(54 55% 6%)
CMYK 0%, 4%, 42%, 6%
Decimal 15787660
CSS keyword khaki
75%HSL lightness (medium-light)
77%HSL saturation (vivid)
54°Hue angle (yellow)
0.770Relative luminance

CMYK is a standard screen-to-print conversion. Printed results depend on inks, paper and color profiles.

What is Khaki?

Khaki is one of the named colors defined by the CSS Color specifications (keyword “khaki”), so every modern browser understands it without a hex code.

Its hue angle of 54° places it in the yellow part of the color wheel, with 77% saturation (vivid) and 75% lightness (medium-light). It is a warm color.

Compared with the other yellow colors in the Aqeeb Studio library, it is lighter than 72% of them and more saturated than 8% of them.

Its relative luminance is 0.770, which makes it a very light color. That is above the 0.179 crossover point at which black and white text have equal contrast, so black text has the advantage.

Khaki counts as a light color: its HSL lightness is 75% and its relative luminance is 0.770. Black text reads best on it (16.40:1 contrast).

Text contrast on Khaki

WCAG contrast of white and black text on Khaki
TextPreviewRatioAA normalAA largeAAA normalAAA large
White text Sample text 1.28:1 Poor Fail Fail Fail Fail
Black text Sample text 16.40:1 Excellent Pass Pass Pass Pass

Ratios use the WCAG 2 formula and are truncated, never rounded up. Test any pair with the contrast checker.

Colors that go with Khaki

Complementary color

Complementary colors sit directly opposite each other on the color wheel (180° apart). They give the strongest hue contrast, which suits calls to action and accents.

Analogous colors

Analogous colors are neighbors on the wheel, 30° either side of the base hue. They blend smoothly and are easy to combine in backgrounds, gradients and illustrations.

Triadic colors

A triadic scheme uses three hues spaced 120° apart. It is lively yet balanced, and works best when one color leads and the other two act as accents.

Split-complementary colors

Split-complementary keeps the base color and uses the two colors on either side of its complement (150° and 210°). The contrast is strong but gentler than a direct complement.

Tetradic colors

A tetradic (rectangle) scheme combines two complementary pairs at 0°, 60°, 180° and 240°. It offers variety but needs one dominant color to stay balanced.

Monochromatic variants

Monochromatic variants keep the same hue and saturation and only change lightness, which makes them dependable for UI scales and subtle layered designs.

#B4A518#B4A518
#E4D22F#E4D22F
#ECE06F#ECE06F
#F4EDAE#F4EDAE
#FDFBED#FDFBED

A “≈” before a name means the exact harmony color has no named match, so the link goes to the closest named color.

Tints and shades of Khaki

Lighter tints (mixed with white)

Darker shades (mixed with black)

Select any swatch to copy its HEX code. Build longer scales with the tints and shades tool.

Where to use Khaki

  • Card, highlight and section backgrounds with dark text (16.40:1 contrast with black)
  • Accents that need to stand out: call-to-action buttons, charts and illustrations
  • Highlighters, badges and caution markers
  • Backgrounds that need to feel bright
  • Accents on dark layouts
  • Infographics and chart series

Use Khaki in CSS

:root {
  --color-khaki: #F0E68C;
}

.element {
  color: var(--color-khaki);
  background-color: #F0E68C;
  border: 2px solid #F0E68C;
}

Questions about Khaki

What is the HEX code for Khaki?

Khaki is #F0E68C.

What is the RGB value of Khaki?

The RGB value of Khaki is 240, 230, 140: 240 red, 230 green and 140 blue on a 0–255 scale, written rgb(240, 230, 140) in CSS.

What is the HSL value of Khaki?

The HSL value of Khaki is 54°, 77%, 75% (hue, saturation, lightness), written hsl(54, 77%, 75%) in CSS.

What is the CMYK value of Khaki?

A standard conversion gives about C 0%, M 4%, Y 42%, K 6%. Real print results depend on the inks, paper and color profile, so treat CMYK here as a reference value.

Is Khaki a light or dark color?

Khaki counts as a light color: its HSL lightness is 75% and its relative luminance is 0.770. Black text reads best on it (16.40:1 contrast).

How does Khaki look with white text?

White text on Khaki has a contrast ratio of 1.28:1, rated Poor. It falls below the WCAG minimum for text.

How does Khaki look with black text?

Black text on Khaki has a contrast ratio of 16.40:1, rated Excellent. It meets WCAG AA for normal text.

What colors go well with Khaki?

Periwinkle Blue is its complementary color, and Burlywood sits beside it as an analogous color. Lighter and darker variants of the same hue also work well for monochromatic palettes.

Where can Khaki be used?

It suits card, highlight and section backgrounds with dark text (16.40:1 contrast with black); accents that need to stand out: call-to-action buttons, charts and illustrations; highlighters, badges and caution markers.

How do I use Khaki in CSS?

Use color: #F0E68C; for text, background-color: #F0E68C; for fills, or define a custom property such as --color-khaki: #F0E68C; and reuse it with var(--color-khaki).

About this color page

CSS named color (W3C CSS Color Module). Values are calculated from the HEX code; color names are labels, not trademarks or standards unless stated. Screens render colors differently, so always check important colors on your own device. See the disclaimer.