About yellow
yellow (#FFFF00) is full red plus full green light, with no blue. It is one of the 16 HTML 4 color names.
It is so close to white in luminance that yellow text on a white background is almost unreadable. Use it as a background behind dark text instead. For warmer alternatives, CSS has gold (#FFD700) and orange (#FFA500).
Shades of yellow
Yellow is lighter than a usual 50 step, so it starts the scale and every other step is darker. The steps follow a lightness curve modeled on Tailwind CSS's default palette; build your own in the Tailwind color generator. For yellow mixed with white, black or gray in even steps, use the tint and shade generator.
Colors that go with yellow
Partner hues are picked on the OKLCH color wheel at a mid lightness, because yellow itself is very light.
Complementary: the opposite hue
Open in the palette generator · Compare the screen and painter's complements of yellow
Analogous: neighboring hues 30° either side
Open in the palette generator · See analogous and monochromatic colors of yellow on three wheels
Triadic: three hues 120° apart
Split complementary: the two hues beside the complement
Text on yellow
| Text | Ratio | AA normal | AA large | AAA normal |
|---|---|---|---|---|
| White | 1.07:1 | Fail | Fail | Fail |
| Black | 19.56:1 | Pass | Pass | Pass |
Check other pairs in the color contrast checker.
Similar named colors
The CSS named colors closest to yellow, by deltaE OK distance.
See all 148 on the color names page.
Closest Tailwind CSS colors
yellow-300 v4: yellow-300, #FFDF20, deltaE OK 0.080
yellow-300 v3: yellow-300, #FDE047, deltaE OK 0.086
No default Tailwind color is a close match: the nearest are yellow-300 in v4 and yellow-300 in v3. Use an arbitrary value instead: bg-[#ffff00]. A deltaE OK of around 0.02 is roughly the smallest difference most people notice side by side. Browse every shade on the Tailwind CSS colors page.
Yellow with color vision deficiency
An approximation of how yellow may look with protanopia, deuteranopia and tritanopia (simulated with Machado, Oliveira and Fernandes, 2009), and with achromatopsia, shown as a gray of the same luminance.
Test a whole palette or image in the color blindness simulator.
Using yellow in code
.example {
color: yellow; /* named color */
background-color: #ffff00; /* hex */
border-color: rgb(255, 255, 0);
}
