Skip to content

Yellow

Yellow is a medium, vivid color. Hex code #FFFF00.

Yellow#FFFF00

Yellow color codes

  • CSS nameyellow
  • HEX#FFFF00
  • RGBrgb(255, 255, 0)
  • HSLhsl(60, 100%, 50%)
  • OKLCHoklch(96.8% 0.211 109.8)
HSB and CMYK values
  • HSB / HSVhsb(60, 100%, 100%)
  • CMYKC0 M0 Y100 K0

White text

1.07:1 · fails WCAG

Black text

19.55:1 · passes WCAG AAA

Shades of yellow

A darker shade of yellow is #BFC034 (200).

Colors that go with yellow

Complementary

Analogous

Triadic

The complementary color of yellow is #0000FF, which is blue.

Click a color to copy its hex code.

Colors similar to yellow

Each compared with yellow.

About this color

Yellow in CSS and design

Yellow is one of the 16 basic color keywords, which come from the VGA palette by way of HTML. These four lines all give the same yellow:

color: yellow;
color: #FFFF00;
color: rgb(255, 255, 0);
color: hsl(60, 100%, 50%);

What to know about yellow

Of the six full-strength screen colors (red, green, blue, cyan, magenta and yellow), yellow is the lightest. As text on white it reaches just 1.07:1, nearly invisible, but black text on yellow reaches 19.55:1, so it works well for highlights; the HTML standard suggests a yellow background with black text for the mark element. Gold (#FFD700) is a warmer, darker yellow.

Frequently asked questions

What is the hex code for yellow?

#FFFF00. In CSS you can also use the keyword yellow, which works in every browser.

What is yellow in RGB and HSL?

In RGB it is rgb(255, 255, 0) and in HSL hsl(60, 100%, 50%). In CMYK it is about C0 M0 Y100 K0, though printed colors vary with paper and ink.

Should I use black or white text on yellow?

Black text works better: it has a contrast ratio of 19.55:1 and passes WCAG AAA. White text reaches 1.07:1.

What is the complementary color of yellow?

#0000FF, which is blue. It sits opposite yellow on the color wheel: the hue turned 180 degrees, with the same saturation and lightness.

Which colors go with yellow?

For strong contrast, pair it with its complementary color #0000FF. For a calmer look, combine it with its analogous neighbors #FF8000 and #80FF00. The palette generator builds more combinations.