#FEF08A color
The swatch above shows #FEF08A with its hex code written on it in white and in black, so you can see which of the two is legible before reading the measured ratios below.
#FEF08A is a light, vivid yellow, closest to the CSS named color khaki (#F0E68C).
It is also a Tailwind CSS default: yellow-200. That means you can write bg-yellow-200 or text-yellow-200 directly, with no arbitrary-value brackets and no entry in your theme config.
Color values
| HEX | #FEF08A |
| RGB | rgb(254, 240, 138) |
| HSL | hsl(53, 98%, 77%) |
| CMYK | cmyk(0%, 6%, 46%, 0%) |
| Decimal | 16707722 |
| CSS | color: #FEF08A; |
| Android | 0xFFFEF08A |
| Swift | UIColor(red: 0.996, green: 0.941, blue: 0.541, alpha: 1) |
Accessibility and contrast
| White text on #FEF08A | 1.16:1 — AA fail · AA large fail · AAA fail |
| Black text on #FEF08A | 18.05:1 — AA pass · AA large pass · AAA pass |
| Recommended text color | black |
WCAG 2.1 asks for at least 4.5:1 for body text and 3:1 for large text (18 pt, or 14 pt bold).
Tints and shades of #FEF08A
Each swatch keeps the hue and saturation of #FEF08A and varies only lightness — the quickest way to build a usable scale from a single brand color.
Colors that go with #FEF08A
Harmonies generated by rotating the hue on the color wheel while holding saturation and lightness constant.
Using #FEF08A in code
/* CSS */
.element { color: #FEF08A; background-color: #FEF08A; }
.element { color: rgb(254 240 138); }
.element { color: hsl(53 98% 77%); }
/* Tailwind */
<div class="bg-yellow-200 text-black">
/* SCSS variable */
$brand: #FEF08A;
Frequently asked questions
What color is #FEF08A?
#FEF08A is a light, vivid yellow. Its hue sits at 53° on the color wheel, with 98% saturation and 77% lightness.
What is #FEF08A in RGB?
#FEF08A converts to rgb(254, 240, 138) — 254 red, 240 green and 138 blue.
What is #FEF08A in CMYK?
Approximately cmyk(0%, 6%, 46%, 0%). Print output depends on the ICC profile of the press and paper, so treat this as a starting point rather than an exact match.
Should text on #FEF08A be white or black?
Black gives the better contrast ratio (18.05:1 versus 1.16:1).
What is the complementary color of #FEF08A?
#8B98FE — the hue directly opposite #FEF08A on the color wheel.