Many species of ants are known for being rather clean by disposing of their dead outside of the nest and placing other wastes, like bits of food, in refuse chambers. Dr. Tomer J. Czaczkes (University of Regensburg) was surprised therefore to see "dark patches" build up in plaster nests that housed black garden ants (Lasius niger). Dr. Czaczkes suspected that these dark patches might actually be feces. He tested this hypothesis by adding food coloring to their diet. Perhaps not surprisingly, the dark patches changed to shades of blue and red.
Several theories exists as to why the ants do not dispose of their fecal matter outside of the nest from acting as a building material or source of potential nutrients to serving as a territorial indicator. According to a quote from Dr. Czaczkes, "Ants tell friend from foe apart by their smell. Perhaps newly emerged ants go to the toilet and sort of ‘bathe’ in it, to pick up the colony smell quickly.”
Czaczkes TJ, Heinze J, Ruther J. Nest Etiquette—Where Ants Go When Nature Calls. PLOS ONE. In Press.