Why do baboons have colorful butts?

The colorful red butts on baboons are usually a sign that the female baboon wants to mate.