Yellow Color

HEX #FFFF00 · rgb(255, 255, 0) · hsl(60, 100%, 50%)

Yellow color codes

Yellow is one of the named colors every browser understands. In CSS you can write it as yellow or #FFFF00.

FormatValue
HEX#FFFF00
RGBrgb(255, 255, 0)
HSLhsl(60, 100%, 50%)
CMYK0%, 0%, 100%, 0%
CSS nameyellow
.example {
  color: yellow;
  background-color: #FFFF00;
  border-color: rgb(255, 255, 0);
}

Colors that go with yellow

These harmonies keep the same saturation and lightness and rotate the hue around the color wheel.

#0000FFComplementary
Blue
#FF8000Analogous
#80FF00Analogous
#00FFFFTriadic
Cyan
#FF00FFTriadic
Magenta

Tints and shades of yellow

Tints mix the color with white; shades mix it with black.

#FFFFE690% white
#FFFFBF75% white
#FFFF9960% white
#FFFF7345% white
#FFFF4D30% white
#FFFF2615% white
#FFFF00Base
Yellow
#D9D90015% black
#B3B30030% black
#8C8C0045% black
#66660060% black
#40400075% black
#1A1A0090% black

Contrast and readability

Black text
19.56:1
passes AA and AAA
White text
1.07:1
fails

Use black text on yellow. Ratios follow the WCAG 2 formula; AA needs 4.5:1 for normal text and 3:1 for large text.

Frequently asked questions

What is the hex code for yellow?

The hex code for yellow is #FFFF00.

What is the RGB value of yellow?

Yellow is rgb(255, 255, 0): 255 red, 255 green and 0 blue on a 0 to 255 scale.

What color goes with yellow?

Its complementary color is #0000FF, which is closest to the named color blue. Analogous and triadic matches are listed on this page.

Should text on yellow be black or white?

Use black text. The contrast ratio is 19.56:1 with black and 1.07:1 with white. WCAG AA asks for at least 4.5:1 for normal text.

Similar named colors

Pick any other color with the color picker, or browse all named colors.