Add to Chrome

Khaki color: hex codes, shades and palettes

Palettes built around khaki. Click any swatch to copy its hex code.

A dull yellow-brown. Worth knowing that the CSS keyword `khaki` is a much lighter, more yellow colour than the fabric the word comes from. This is the fabric.

Khaki hex, RGB, HSL and OKLCH

#8B7B4F
HEX
#8B7B4F
RGB
rgb(139, 123, 79)
HSL
hsl(44, 28%, 43%)
OKLCH
oklch(58.7% 0.064 90.3)
On white
4.16:1
On black
5.04:1

Shades of khaki

9 steps from one base color, generated in OKLCH so each step is an equal perceived step rather than an equal numeric one. Click a swatch to copy it.

Khaki color values

#8B7B4Frgb(139, 123, 79)
Color spaces of #8b7b4f
RGB13912379
HSL44°28%43%
HSV44°43%55%
CMYK0.000.120.430.45
XYZ19.142220.220110.2902
Yxy20.22010.38550.4072
CIE-Lab52.0852-0.389626.2884
Hunter Lab44.9668-2.705217.9089
OKLCH58.7%0.06490.3°

#8B7B4F is 139 red, 123 green and 79 blue. Its red channel carries the most of it. The nearest of the 216 web safe colors is #996666.

CIE-Lab, XYZ and Yxy are measured against D65, the white point sRGB itself is defined against. Hunter Lab uses the original illuminant C constants, which is what paint and plastics specifications quote, so the two Lab rows are not directly comparable. CMYK is the plain arithmetic conversion: real ink values depend on the press, the paper and the profile.

Base numbers
BaseRedGreenBlue
Binary100010110111101101001111
Octal213173117
Decimal13912379
Hex8B7B4F

#8b7b4f mixed with black

Ten even steps of the classic shade ramp, worked out in RGB, which is how the term has always been defined and how other references list it. The OKLCH scale further down this page answers a different question: it steps by equal perceived amounts, so its values are not the same.

  • #8B7B4F
  • #7D6E47
  • #6F623F
  • #615637
  • #53492F
  • #453D27
  • #37311F
  • #292417
  • #1B180F
  • #0D0C07
  • #000000

#8b7b4f mixed with white

The tint ramp, by the same rule in the other direction.

  • #8B7B4F
  • #968860
  • #A29572
  • #ADA283
  • #B9AF95
  • #C5BDA7
  • #D0CAB8
  • #DCD7CA
  • #E7E4DB
  • #F3F1ED
  • #FFFFFF

Channel shares

  • Red40.8%
  • Green36.1%
  • Blue23.2%

Color schemes

Turned in OKLCH rather than HSL, so every member keeps the lightness and chroma of the original instead of one of them arriving washed out.

Complementary

  • #8B7B4F
  • #6D7BA3

Triadic

  • #8B7B4F
  • #4B8792
  • #936F8F

Analogous

  • #8B7B4F
  • #778257
  • #997455

Monochromatic

  • #251B00
  • #473809
  • #68582D
  • #8B7B4F
  • #B09F72
  • #D6C597
  • #FEECBD

#8b7b4f on black and on white

The quick brown fox jumps over the lazy dog. 5.04:1

The quick brown fox jumps over the lazy dog. 4.16:1

Body text needs 4.5:1 to meet AA and large text needs 3:1, so a ratio tells you which of the two backgrounds this color can be read on, and at what size.

CSS for #8b7b4f

color: #8b7b4f;
background-color: #8b7b4f;
border: 3px solid #8b7b4f;
box-shadow: 1px 1px 3px 2px #8b7b4f;
text-shadow: 4px 4px 2px rgba(139, 123, 79, 0.8);

/* Perceptually even, and what a modern stylesheet wants */
color: oklch(58.7% 0.064 90.3);

The OKLCH form is the same color stated so that lightening or darkening it moves by an amount the eye agrees with. Every current browser understands it.

Contrast and readability

Khaki on white measures 4.16:1 and on black 5.04:1. WCAG AA asks for 4.5:1 on normal text and 3:1 on large text and UI components, so the higher of those two decides which background it belongs on. In the scale above, 500 is the first to clear 4.5:1 on white, at 5.32:1.

The contrast checker reports every level for a given pair and suggests the nearest passing shade on the same hue. The color picker builds this same scale from any color you paste in.

Related colors: taupe, brown, tan, sand, tuscan, clay. See every shade on the colors index.

Get Palette Vault from the Microsoft Store