CSS named color
Yellow #FFFF00
Yellow is a vivid yellow with the hex code #FFFF00, which converts to rgb(255, 255, 0). Open #FFFF00 in the converter to tweak it.
Yellow color values
| HEX | #FFFF00 |
|---|---|
| HEX (shorthand) | #FF0 |
| RGB | rgb(255, 255, 0) |
| RGBA | rgba(255, 255, 0, 1) |
| 8-digit HEX | #FFFF00FF |
| HSL | hsl(60, 100%, 50%) |
| HSV / HSB | 60°, 100%, 100% |
| CMYK | 0%, 0%, 100%, 0% |
| RGB 0–1 | 1, 1, 0 |
| Decimal | 16776960 |
| CSS keyword | yellow |
How #FFFF00 converts to RGB
Split the hex code into three pairs and read each pair as a base-16 number: FF → 255, FF → 255, 00 → 0. That gives rgb(255, 255, 0). The step-by-step guide explains the math.
Shades of Yellow
Mixed toward black in 10% steps. Click a swatch to copy its hex.
Tints of Yellow
Mixed toward white in 10% steps.
Color harmonies
Hue rotations of Yellow on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.
Complementary
Analogous
Split-complementary
Triadic
Tetradic (square)
Contrast and accessibility
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | Yellow | 1.07:1 | Fail |
| Black | Yellow | 19.55:1 | AAA |
Use black text on a yellow background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.
Use Yellow in CSS
.element {
color: yellow; /* keyword */
background-color: #FFFF00; /* hex */
border-color: rgb(255 255 0 / 50%); /* 50% transparent */
}
Need it semi-transparent? Append an alpha byte: #FFFF0080 is Yellow at 50% opacity. See RGBA & transparency.
Similar named colors
FAQ
What is the HEX code for Yellow?
The CSS named color yellow is #FFFF00 in hexadecimal. In CSS you can write color: yellow; or color: #FFFF00; — both produce the same pixel.
What is Yellow in RGB?
Yellow is rgb(255, 255, 0): red 255, green 255, blue 0 on the 0–255 scale. As normalized 0–1 floats that is (1, 1, 0).
Is white or black text more readable on Yellow?
Black text is more readable. White on #FFFF00 has a contrast ratio of 1.07:1 (Fail), black on #FFFF00 has 19.55:1 (AAA). WCAG AA needs 4.5:1 for normal text.