About yellow
Pure yellow: red and green at full strength with no blue. Its hex code is #FFFF00, which is rgb(255, 255, 0): 255 red, 255 green and 0 blue on a scale of 0 to 255.
Yellow is a warm color.
Yellow tints and shades
Lighter tints (mixed with white) and darker shades (mixed with black) of yellow. Click any of them to copy its hex code.
Colors that go with yellow
Complementary
The opposite color on the color wheel, for strong contrast.
Analogous
Neighbors on the color wheel, for a calm, matching look.
Triadic
Three colors evenly spaced around the wheel, for a balanced, lively palette.
Split complementary
The two colors either side of the complement: contrast without clashing.
Text on yellow
White text
Black text
For readable text, WCAG asks for a contrast ratio of at least 4.5:1 (3:1 for large text). Black text is the better choice on yellow. Test other combinations with the contrast checker.
Using yellow in CSS
.element {
color: #FFFF00;
background-color: rgb(255 255 0);
border-color: hsl(60 100% 50%);
}
Frequently asked questions
What is the hex code for yellow?
Yellow is #FFFF00. In RGB it's rgb(255, 255, 0), and in HSL it's hsl(60, 100%, 50%).
What colors go with yellow?
Its complementary color is #0000FF, which gives strong contrast. For a softer look, use analogous colors #FF8000 and #80FF00. Yellow also pairs well with white.
Is yellow warm or cool?
Yellow is a warm color.
Should I use white or black text on yellow?
Use black text. Its contrast ratio on yellow is 19.55:1, versus 1.07:1 for white.
Similar colors
- Gold#FFD700rgb(255, 215, 0)
- Olive green#808000rgb(128, 128, 0)
- Mustard yellow#FFDB58rgb(255, 219, 88)
- Orange#FFA500rgb(255, 165, 0)
- Cream#FFFDD0rgb(255, 253, 208)
- Ivory#FFFFF0rgb(255, 255, 240)
See all popular colors · All HTML color names · Open yellow in the color picker