Lighter and darker yellow
Each step mixes in more white or black, in even steps for the eye. Tap a swatch to copy its code.
Lighter
Darker
Colors that go with yellow
Complementary
Across the color wheel. Strong contrast, good for one button or one word.
Analogous
Its neighbors on the wheel. Calm, easy to use together.
Triadic
Three colors evenly spread. Lively, best with one in charge.
Pairs well in a brand
Yellow and text
Black text reads best on yellow: 19.55:1. The same numbers hold for yellow text on a white or a black page. Body text needs 4.5:1 for AA and 7:1 for AAA; large text needs 3:1.
| Text | Contrast | WCAG |
|---|---|---|
| AaWhite text on yellow | 1.07:1 | Fails |
| AaBlack text on yellow | 19.55:1 | AAA |
How yellow looks with color blindness
Other yellow hex codes
Pure yellow glows on screen and is hard to read against white. Most brand yellows are a little warmer or softer: gold #FFD700, mustard #FFDB58 or canary yellow #FFEF00. For a pale background, CSS has light yellow #FFFFE0 and lemon chiffon #FFFACD.
- YellowCSS named color: yellow. The code on this page
#FFFF00 - GoldCSS named color: gold
#FFD700 - Canary yellowCommon variant
#FFEF00 - MustardCommon variant
#FFDB58 - Lemon chiffonCSS named color: lemonchiffon
#FFFACD - Light yellowCSS named color: lightyellow
#FFFFE0
Yellow in a small business brand
Yellow is cheerful and gets noticed: cafés, kids activities, cleaning services and summer sales. It shines as a background for a short message in black text, like a sticky note. Never use it as text on white, which is close to invisible. On a dark post, a small yellow badge or underline is enough to catch the eye.
FAQ
What is the hex code for yellow?
Yellow is #FFFF00 as the CSS named color yellow. In RGB that is rgb(255, 255, 0), and in CMYK cmyk(0%, 0%, 100%, 0%).
What text color goes on yellow?
Black text, at a contrast of 19.55:1, which passes WCAG AAA. White text reaches 1.07:1, too low for any text.
What is the hex code for mustard yellow?
Mustard is often written as #FFDB58, which is rgb(255, 219, 88). It has no CSS name.
Can I use yellow text on a white background?
No. Yellow on white is 1.07:1, far below the 4.5:1 that text needs. Use yellow as a background with black text instead.