Khaki
Hex #F0E68C, rgb(240 230 140). A yellow CSS named color.
Open in palette generatorKhaki color codes
Click any value to copy it.
- HEX
- RGB
- HSL
- HSV
- HWB
- CMYK
- OKLCH
- OKLab
- Lab
- LCH
- CSS keyword
About Khaki
Khaki is a very light moderately saturated yellow with the hex code #F0E68C. In RGB it is made of 240 red, 230 green and 140 blue; in HSL its hue is 54°, with 77% saturation and 75% lightness. Its perceptual lightness (OKLCH L) is 91.3%.
It is a CSS named color, so you can write "khaki" anywhere CSS accepts a color. Against white it has a contrast ratio of 1.28:1 and against black 16.40:1, so black text reads better on it and passes WCAG AA for normal text.
Tints, shades and tones
Khaki mixed step by step with white, black and middle gray (#808080).
Tints (with white)
Shades (with black)
Tones (with gray)
Khaki 50-950 scale
A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.
Colors that go with Khaki
Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.
Complementary
Analogous
Split complementary
Contrast and readability
WCAG 2 contrast of Khaki with white and black. The readable text color on Khaki is black.
On white1.28:1
- AA fail
- AA Large fail
- AAA fail
- UI 3:1 fail
APCA Lc 14
On black16.40:1
- AA pass
- AA Large pass
- AAA pass
- UI 3:1 pass
APCA Lc -90
Test any pair in the contrast checker.
Color blindness preview
How Khaki appears with each type of color vision deficiency (simulated with the Machado model).
- Protanopia#F5E085
- Deuteranopia#F8E690
- Tritanopia#FDDBD0
- Protanomaly#F4E288
- Deuteranomaly#F6E58E
- Tritanomaly#F5E1AF
- Achromatopsia#E3E3E3
Colors similar to Khaki
The closest named colors by perceptual difference (OKLab).
Use Khaki in CSS and Tailwind
.khaki {
color: khaki; /* #F0E68C */
background-color: rgb(240 230 140);
border-color: oklch(91.3% 0.112 102.8);
}/* Tailwind CSS v4: bg-khaki-500, text-khaki-700... */
@theme {
--color-khaki-50: #FFFCDB;
--color-khaki-100: #F0E68C;
--color-khaki-200: #E8D400;
--color-khaki-300: #CBBA00;
--color-khaki-400: #A69700;
--color-khaki-500: #8E8200;
--color-khaki-600: #7A6F00;
--color-khaki-700: #625A00;
--color-khaki-800: #4F4800;
--color-khaki-900: #413A00;
--color-khaki-950: #1A1700;
}
<!-- or the exact color, no config -->
<div class="bg-[#F0E68C] text-[#000000]">…</div>