Yellow color codes
| CSS name | yellow |
|---|---|
| HEX | #FFFF00 |
| RGB | rgb(255, 255, 0) |
| HSL | hsl(60, 100%, 50%) |
| CMYK | cmyk(0%, 0%, 100%, 0%) |
| Decimal | 16776960 |
Shades of Yellow (darker)
#E6E600 · #CCCC00 · #B3B300 · #999900 · #808000 · #666600 · #4D4D00 · #333300 · #1A1A00
Tints of Yellow (lighter)
#FFFF1A · #FFFF33 · #FFFF4D · #FFFF66 · #FFFF80 · #FFFF99 · #FFFFB3 · #FFFFCC · #FFFFE6
Color harmonies
| Complementary | #0000FF |
|---|---|
| Triadic | #00FFFF, #FF00FF |
| Analogous | #FF8000, #80FF00 |
Accessibility (WCAG contrast)
| White text on Yellow | 1.07:1 · Fail |
|---|---|
| Black text on Yellow | 19.56:1 · AAA |
Use Yellow in code
.element {
color: yellow; /* or #ffff00 */
background-color: rgb(255 255 0 / 0.5);
}Frequently asked questions
What is the hex code for Yellow?
Yellow is #FFFF00 in HEX, rgb(255, 255, 0) in RGB and hsl(60, 100%, 50%) in HSL.
Can I use "yellow" directly in CSS?
Yes. "yellow" is one of the 148 standard CSS named colors, so color: yellow; works in every browser.
Is Yellow readable on white?
The contrast ratio of Yellow on white is 1.07:1 (WCAG Fail). On black it is 19.56:1 (AAA).
What is the complementary color of Yellow?
The complementary color (opposite on the color wheel) is #0000FF.
Similar colors
Gold#FFD700Orange#FFA500Green Yellow#ADFF2FGoldenrod#DAA520Dark Orange#FF8C00Yellow Green#9ACD32Chartreuse#7FFF00Lawn Green#7CFC00
Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.