What causes yellowish discharge?

Pus can cause it. If it has a bad odor see a doctor. Discharge can also have a different color when you ovulate.