Yellow color (#FFFF00)
Yellow is one of the 148 CSS named colors. Use the keyword yellow
anywhere CSS accepts a color, or its hex code #FFFF00, which is rgb(255, 255, 0) in RGB.
It is a very light, vivid warm color with a hue angle of 60° on the HSL color wheel and a perceived lightness of 97% in OKLCH. On a yellow background, black text gives the higher contrast at 19.55:1, which passes WCAG AA for normal text.
Yellow color codes
| CSS name | yellow |
|
|---|---|---|
| HEX | #FFFF00 |
|
| HEX (8-digit) | #FFFF00FF |
|
| RGB | rgb(255, 255, 0) |
|
| HSL | hsl(60, 100%, 50%) |
|
| HSV / HSB | hsv(60, 100%, 100%) |
|
| OKLCH | oklch(96.8% 0.211 109.8) |
|
| CMYK | cmyk(0%, 0%, 100%, 0%) |
Contrast with white and black
WCAG 2 contrast ratios and APCA lightness contrast (Lc) for yellow used as text and as a background.
Tints and shades of yellow
Tints mix yellow with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.
Tints
Shades
Colors that go with yellow
Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.
Complementary
Analogous
Triadic
Split-Complementary
Yellow with color blindness
Approximately how yellow appears with each type of color vision deficiency. Test full designs with the color blindness simulator.
Using yellow in CSS
.element {
color: yellow;
background-color: #ffff00;
border-color: rgb(255 255 0 / 50%);
outline-color: oklch(96.8% 0.211 109.8);
}Similar named colors
See all shades of yellow or browse every CSS color name.