yellow — #FFFF00
#FFFF00
rgb(255, 255, 0) · hsl(60, 100%, 50%) · CSS keyword yellow
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| yellow on white | 1.07:1 | — | — |
| yellow on black | 19.56:1 | AA | AA |
As a background, yellow takes black text: 19.56:1 against 1.07:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.
Using it
color: yellow;
color: #ffff00;
color: rgb(255 255 0);
All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.
Colours close to yellow
- gold — #FFD700
- greenyellow — #ADFF2F
- khaki — #F0E68C
- palegoldenrod — #EEE8AA
- navajowhite — #FFDEAD
- moccasin — #FFE4B5
Frequently asked questions
What is the hex code for yellow?
The hex code for yellow is #FFFF00 — RGB 255, 255, 0.
Can I use yellow for text?
Not on a white background. yellow reaches only 1.07:1, and WCAG AA asks for 4.5:1. It works as a background or a border, not as ink.
Should text on yellow be black or white?
Black — 19.56:1 against 1.07:1 the other way.
Other named colours
- yellowgreen — #9ACD32
- aliceblue — #F0F8FF
- antiquewhite — #FAEBD7
- aqua — #00FFFF
- aquamarine — #7FFFD4
- azure — #F0FFFF
- beige — #F5F5DC
- bisque — #FFE4C4
- black — #000000
- blanchedalmond — #FFEBCD
- blue — #0000FF
- blueviolet — #8A2BE2
#FFFF00 in full — tints, shades and harmonies · All named colours · Colour reference