White on yellowBlack on yellow

Shades to explore

YELLOW FAMILY

Yellow colour code

#FFFF00

Yellow (#FFFF00) is a medium-light, vivid shade in the yellow family. Its HSL lightness is 50% and saturation is 100%.

HEX#FFFF00
RGBrgb(255, 255, 0)
HSLhsl(60, 100%, 50%)

Text contrast

With white: 1.07:1 · With black: 19.56:1

Normal text needs 4.5:1 for AA; large text needs 3:1.

Use Yellow in CSS

Copy this background and text pairing into your stylesheet.

.colour-yellow {
  background-color: #FFFF00;
  color: #000000;
}

Use the HEX value for a consistent digital reference. Descriptive colour names can vary between collections and are not always valid CSS keywords. This code does not identify a paint, fabric or print specification.

Using Yellow

Try it for highlights and callouts, checking text contrast especially carefully on lighter shades.

Black text on Yellow

19.56:1 · AAA for normal text

This pairing uses #000000 text on #FFFF00. Results apply to solid colours; recheck contrast if you add transparency, imagery or effects.

Colour companions

Similar shades in the yellow family