hexcolors

Color combinations / Yellow and Black

Yellow and Black color combination

One of the two is a neutral, which makes this an easy, safe pairing.

Do they work together?

Yes. Yellow and Black have a contrast ratio of 19.56:1, which passes WCAG AA for body text.

Contrast is the same in both directions. Check other pairs in the contrast checker.

See it in use

Black text on yellow

The quick brown fox jumps over the lazy dog.

Yellow text on black

The quick brown fox jumps over the lazy dog.

Copy the colors

--yellow: #ffff00;
--black: #000000;

More with yellow

Common questions

Do yellow and black go well together?

One of the two is a neutral, which makes this an easy, safe pairing. Yes. Yellow and Black have a contrast ratio of 19.56:1, which passes WCAG AA for body text.

What are the hex codes for yellow and black?

Yellow is #FFFF00 and Black is #000000.

Can I use yellow text on black?

Yes. Yellow and Black have a contrast ratio of 19.56:1, which passes WCAG AA for body text.