Yellow Color Code (#ffff00)

Yellow is #ffff00 in hex and rgb(255, 255, 0) — a medium yellow. Below: every color format, tints and shades, harmonies and how readable it is as text.

Updated

Yellow
#ffff00
CSS nameyellow
Hex#ffff00
RGBrgb(255, 255, 0)
HSLhsl(60 100% 50%)
HWBhwb(60 0% 0%)
CMYK0%, 0%, 100%, 0%

Tints and shades

Color harmonies

About Yellow

Yellow (yellow) is a medium, vivid yellow with the hex code #ffff00, or rgb(255, 255, 0). In HSL it sits at a hue of 60°, 100% saturation and 50% lightness. It is one of the 148 named colors every browser understands, so you can write color: yellow; instead of the hex value.

Using Yellow for text and backgrounds

PairingContrast ratioWCAG
Yellow text on white1.07 : 1fails
Yellow text on black19.56 : 1AAA

On a yellow background, use black text (19.56 : 1). WCAG asks for at least 4.5 : 1 for body text and 3 : 1 for large text. Check other pairs with the Contrast Checker.

CSS

.element {
  color: yellow;               /* or #ffff00 */
  background-color: #ffff00;
  border: 1px solid rgb(255 255 0 / 50%);
}

Similar named colors

Gold (#ffd700), Orange (#ffa500), Green Yellow (#adff2f), Goldenrod (#daa520), Dark Orange (#ff8c00), Yellow Green (#9acd32).

Color Name FinderPaste a HEX code to get its closest human-readable name and clean token names for your CSS, SCSS, JavaScript or Tailwind config.
Open the tool

Frequently asked questions

What is the hex code for yellow?
#ffff00 — that is rgb(255, 255, 0) and hsl(60, 100%, 50%). In CSS you can also just write yellow.
Is yellow text readable on white?
Its contrast ratio on white is 1.07 : 1, which fails WCAG — use it for decoration or on a dark background instead.
What colors go well with yellow?
Its complementary color is #0000ff; analogous colors #ff8000 and #80ff00 sit next to it on the color wheel.