Skip to content

Yellow

Yellow is a medium, vivid color from the yellow family. Hex code #FFFF00.

Yellow#FFFF00

Color codes

  • CSS nameyellow
  • HEX#FFFF00
  • RGBrgb(255 255 0)
  • HSLhsl(60 100% 50%)
  • HSB / HSVhsb(60, 100%, 100%)
  • OKLCHoklch(96.8% 0.211 109.8)
  • CMYKcmyk(0%, 0%, 100%, 0%)

White text

1.07:1 · fails WCAG

Black text

19.55:1 · passes WCAG AAA

Shades

50#FBFC46
100#DEDE00
200#BFC034
300#A3A328
400#878718
500#6D6D01
600#535305
700#3A3A00
800#232301

Complementary

#FFFF00
#F4F3FE

Analogous

#FFFF00
#FFF3E0
#E0FFD9

Triadic

#FFFF00
#E8F7FF
#FEF0F6

About this color

Yellow in CSS and design

Yellow is a medium, vivid color from the yellow family. Yellow is one of the 16 basic color keywords, which go back to HTML 4, long before CSS had 148 named colors.

Use it in CSS by name or by any of its codes; these all give the same color:

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

For text on yellow, black reads best. Check other combinations with the contrast checker, or browse all CSS color names.

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), in HSL hsl(60 100% 50%). For print, cmyk(0%, 0%, 100%, 0%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

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.

Which colors go with yellow?

Its complementary color is #F4F3FE, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #FFF3E0 and #E0FFD9. The palette generator builds more combinations.