Why does clothes' colour fade when they are dried in the sun?

Colour is imparted to clothes by impregnating dyes into the fabric structure. There are a number of different types of dyes that are used in the textile industry which differ from each other in their basic chemical structure and their mode of application to the fabric. The fact that the dyes are brightly coloured is itself an indication that they absorb light. The absorbed light can often degrade the dye molecules, a process referred to as photochemical degradation. The extent of photochemical degradation depends strongly on the chemical nature of the dye used. A class of dyes called `direct dyes' are in general strongly degraded and hence have poor light fastness, while another class of dyes called the `vat dyes', for example, have superior light fastness. While certain additives are available, that claim to improve light fastness of some dyes, their use is not universal. An easy way to minimize fading due to light would be to dry clothes on an indoor line rather than in a hot sunny ambience!

Source: thehindu.com