When chlorine reacts with water, it produces nascent oxygen. This nascent oxygen then combines with the coloured substances present in the organic matter to oxide them into colourless substances.

Coloured substances + [O] → Oxidized colourless substance