Palette maker

Khaki Gradient: Colors, Hex Codes and CSS

A khaki gradient blends the pale yellows and sandy tans of the khaki family, and the three codes to start from are , and . For a classic result, run 135 degrees from to .

Type
135°
 

More khaki gradients to try

On this page
  1. What is khaki
  2. Color codes
  3. Shade compare
  4. CSS code
  5. Smooth blends
  6. Contrast
  7. Pairings
  8. Palettes
  9. Real uses
  10. Print tips
  11. FAQ

One thing trips up almost everyone: “khaki” names two different colors depending on whether you are writing CSS or shopping for trousers. This page sorts that out, then gives you the codes, CSS, contrast numbers, pairings and print advice to build a khaki gradient that looks intentional.

What Color Is Khaki? Three Shades, Three Codes

Khaki is a muted, dusty color that sits between yellow, tan and olive. The word comes from Hindi and Urdu for “dusty”, and it spread through the dust-colored field uniforms that British Indian Army units adopted in the mid-1800s. From there it moved into chinos, safari jackets and military kit, which is why khaki still feels practical and outdoorsy.

On screens the name is split in two. The CSS keyword khaki is , a pale, fairly saturated yellow. The tan most people picture from fabric is , and CSS also has darkkhaki, which is , a muted yellow-olive. This page calls them Light Khaki, Khaki and Dark Khaki, and together they make a natural light, mid and deep ramp for a gradient.

Khaki Color Codes: HEX, RGB, HSL and CMYK

Here are the values for all three shades, computed from the hex codes. The CMYK figures use the simple screen-to-print formula, so treat them as a starting point rather than a press-ready recipe.

Shade HEX RGB HSL CMYK
Light Khaki (CSS khaki) 240, 230, 140 54°, 77%, 75% 0, 4, 42, 6
Khaki 195, 176, 145 37°, 29%, 67% 0, 10, 26, 24
Dark Khaki 189, 183, 107 56°, 38%, 58% 0, 3, 43, 26

The HSL column explains the look. Hue barely moves across the three (37° to 56°), so they all read as warm yellow-browns. The real difference is saturation and lightness: is vivid and bright, while is the most muted of the set at 29% saturation.

Light Khaki, Khaki and Dark Khaki Compared

Telling these shades apart makes your gradient choices much easier. Here is how each one behaves:

  • Light Khaki : a soft, sunny yellow. Close to pale lemon, and the shade that is most likely to read as “yellow” rather than “khaki”.
  • Khaki : a sandy tan with a slight pink-brown warmth. This is the fabric color and the safest neutral for backgrounds.
  • Dark Khaki : a greener, olive-leaning yellow. It looks the most military and pairs naturally with forest greens.

Light Khaki is nearly a pure yellow, so if you want a brighter, more golden direction, the yellow gradient page covers that end of the family. Dark Khaki and Khaki are close in lightness, which means a gradient between them is subtle: you get a shift in temperature, not in brightness.

Quick way to tell them apart

Look at saturation first. Khaki is at 29%, Dark Khaki at 38% and Light Khaki at 77%.

Which hex code is the CSS keyword khaki?

The CSS keyword khaki is the pale yellow #F0E68C, while the tan most people picture is #C3B091.

Khaki Gradient CSS You Can Paste

The studio above lets you change stops, angle and type, then copy the result. The classic version looks like this:

background: #C3B091; /* fallback */
background: linear-gradient(135deg, #F0E68C 0%, #C3B091 100%);

A three-stop gradient that moves through all the khaki shades gives more depth:

background: linear-gradient(135deg, #F0E68C 0%, #C3B091 55%, #BDB76B 100%);

Angle changes the feel more than people expect. Use 180deg (top to bottom) for hero sections and page backgrounds, 135deg for cards and buttons, and 90deg for horizontal bars and dividers. A radial gradient such as radial-gradient(circle at 30% 20%, , ) works as a soft, sunlit glow behind a product.

Modern browsers also let you choose the interpolation space, which changes how the middle of the blend looks:

background: linear-gradient(in oklch 135deg, #F0E68C, #C3B091);

Keep a plain hex fallback line above it for older browsers. For design systems, store the stops as custom properties (for example —khaki-light, —khaki-mid and —khaki-deep) so one change updates every surface.

Keeping Khaki Gradients Smooth, Not Muddy

Khaki is low in chroma, so it is easy to dirty. The usual culprit is the far end of the gradient: blend khaki into a cool color in plain sRGB and the midpoint collapses to grey. Khaki to navy lands at roughly halfway, a flat grey with no life. Add a middle stop with some warmth, or try the oklch interpolation shown above.

The second problem is banding. When a large area moves between two near colors, such as to , 8-bit screens can show faint stripes. Use a wider range between stops, add a third stop, or lay a very light grain texture over the top.

Try this: Create a gradient from to , then add a middle stop at 50% using . Compare it with the two-stop version and note how the grey dead zone disappears.

I once built a khaki-to-white hero for an outdoor brand, and on a phone it read as dirty paper instead of warm sand. Swapping the white end for the cream fixed it, because the gradient stayed in the same hue family from edge to edge.

Text Contrast on Khaki Backgrounds

Khaki gradients are light, so dark text is the natural choice and white text is the trap. These ratios were computed from the WCAG relative luminance formula:

  • Black on : about 16.4:1
  • Black on : about 9.9:1
  • Black on : about 10.1:1
  • Dark olive on : about 7.7:1, and on : about 4.7:1
  • White on : about 1.3:1, and on or : about 2.1:1

WCAG AA asks for 4.5:1 for normal text and 3:1 for large text and interface components. White fails everywhere on this page. Dark olive passes, though on it only just clears the line, so use black or a darker brown for small body text there.

Which text color is the safest choice on a khaki gradient?

Khaki is a light color, so dark text clears WCAG easily while white text sits near 1.3:1 to 2.1:1.

A gradient changes under the text, so test the lightest and the darkest point behind it. I once fixed a client banner where white headline text looked fine over the deep end of a khaki gradient but vanished as the blend lightened. Switching the headline to solved it across the whole banner.

Strip of five swatches: three khaki backgrounds, dark olive text marked as passing and white text marked as failing
Dark olive text passes on khaki at 4.7:1, while white text fails at only 2.1:1.

Colors That Pair Well With Khaki

Khaki is a supporting color by nature. Navy gives the clearest contrast and a crisp, tailored look, while charcoal is a quieter, more modern partner. For cooler, fresher results, a teal gradient next to khaki feels like a coastal field jacket.

Two khaki gradient app cards compare dark olive text passing contrast with white text failing at both gradient ends
On a khaki gradient, dark olive text passes at both ends, while white text fails everywhere.

Greens are the most natural relatives. Sage and forest echo Dark Khaki’s olive side, and a pastel green gradient turns the combination into something soft and spring-like. For warmth, terracotta and a bronze gradient push khaki toward desert and leather tones.

Khaki also works on dark interfaces as an accent. Against a near-black base from the black gradient set, becomes a warm highlight that feels gentler than pure yellow.

Khaki Gradient Palettes Ready to Copy

These four palettes are built around Light Khaki, Khaki and Dark Khaki, each with a dark anchor for text and a tint for breathing room. Pick the one closest to your mood, then drop the stops into the studio.

Field Notes

Journals, outdoor brands and calm app backgrounds with a worn paper feel.

Desert Canvas

Interior mood boards, packaging and soft editorial layouts with earthy warmth.

Khaki and Navy

Menswear lookbooks, fintech dashboards and corporate decks that need a calm contrast.

Khaki Garden

Wellness brands, plant shops and organic packaging with sage and forest depth.

Every palette keeps at least one very dark color. That gives you a text color that passes contrast on the lighter khaki stops.

Khaki in Branding, Interiors, Fashion and Art

In branding, khaki signals reliability and the outdoors, which is why it suits expedition gear, tools, coffee and heritage clothing. A subtle khaki gradient on packaging or a website header adds depth without the shine of a metallic effect. In UI, it works best as a calm surface color behind cards, with a single saturated accent for actions.

In interiors, khaki-toned walls act like a warmer alternative to grey. They suit rooms with natural light, wood and linen, and soft transitions look best as a color wash or a lit wall, not as a hard gradient. In fashion, the khaki family covers chinos, trench coats and utility jackets, and a gradient or ombré dye usually moves from sand to olive.

For artists, khaki is easy to mix: start with yellow ochre, add a little grey or green, and lighten with white. A khaki gradient works well as a toned ground for a landscape, because it gives the paint a mid-light value to build from.

Printing Khaki Gradients Without Surprises

Khaki sits in the zone where screens and presses disagree. Muted yellow-browns are made from small amounts of three or four inks, so slight press variation shifts the result toward green or grey. , with its 42% yellow, is the most forgiving, while is the most likely to drift.

I once had a khaki-to-cream gradient on a packaging proof that showed faint steps that were invisible on screen. A very light texture over the gradient hid them completely. Always request a physical proof for gradients, and avoid long, shallow ramps between near colors.

Keep the extra rules short. Convert with the printer’s profile, not the naive numbers above. Use coated stock for the cleanest blends. And if brand color accuracy matters, ask about a spot color for the main khaki and let the gradient handle only the transition.

The colors behind these gradients

Khaki Gradient: questions people ask

What is the hex code for khaki?

In CSS, the keyword khaki is #F0E68C and darkkhaki is #BDB76B. The tan khaki used for trousers and fabric is usually written as #C3B091, so check which one a brief means before you copy a code.

Is khaki a green or a brown?

Neither, strictly. Khaki sits between yellow, tan and olive, and its character changes with the shade: #F0E68C leans yellow, #C3B091 leans brown and #BDB76B leans green.

What colors go well with a khaki gradient?

Navy, charcoal, deep teal, sage green, terracotta and cream all work. Dark partners give contrast, while soft greens and creams keep the mood earthy and calm.

Can I put white text on a khaki gradient?

Not safely. White on #F0E68C measures about 1.3:1, and on #C3B091 or #BDB76B about 2.1:1, far below the 4.5:1 WCAG AA target. Use dark olive or near black text instead.

How do I make a khaki gradient in CSS?

Write background: linear-gradient(135deg, #F0E68C, #C3B091); on any element. Change the angle, add a third stop, or switch to radial-gradient for a soft glow.

Keep exploring