RIO DE JANEIRO — Olympics officials on Saturday gave what they said was a definitive explanation why the water in two competition pools turned green this week. Someone, the officials said, mistakenly added 160 liters of hydrogen peroxide on Aug. 5, neutralizing the chlorine and allowing the growth of “organic compounds” that might have included algae.

On Saturday, the water in the diving pool was still a murky bottle-green color, while the water in the second pool, used for water polo and synchronized swimming, had begun to look a bit lighter and a bit bluer. Athletes have been complaining that the water or the chemicals treating it hurt their eyes, and that murkiness makes underwater visibility impossible.

Synchronized swimming, in which athletes have to be able to see each other below the surface, is scheduled to start Sunday. Mario Andrada, a spokesman for the Rio Games, said that to ensure that the competition could go ahead, officials would drain the water from the pool — all 3,725,000 liters of it — and replace it with clean water from a nearby practice pool.