While drinking water, some of it spilled on my shirt and as usual, as has happened to many of us, the colour darkened. So why does this happen? Is it due to some chemical effect or physical one?
This is not so much a change (physical and especially not chemical), it is more about perception of the diffuse reflection and refraction of light. According to Australia's ABC Science page Darker when wet:
When your clothes are wet, all those air gaps (between the fibres) get filled with water. So when light hits a wet patch it's moving in and out of water and fibres, not air and fibres. The refractive index of fabric is a lot closer to that of water than it is to air, so the light doesn't change speed quite as dramatically going between water and fibres. And that means it bends at a smaller angle when it goes from one to the other.
This is summarised in the diagram below:
The information on the linked page is from Professor David Jamieson from the School of Physics at The University of Melbourne, Australia.
Another explanation according to Dr. Christopher Baird of the website Science Questions with Surprising Answers is that we perceive a darkening due to the fabric becoming more transparent - an explanation from the website:
Spill some water on your white shirt and the situation changes. In the spot that is wet, the water fills all the little pockets in the fabric that used to be filled with air. In terms of its interaction with light, water behaves very similar to fiber material. Adding water to fabric effectively removes the multiple reflecting surfaces (at least as far as the light is concerned) and turns it back optically to a solid chunk of material, which is transparent.
Essentially, what we are perceiving when the fabric appears to darken, is due to the colour of what is underneath - view the cloth with a light source behind it, it appears 'lighter', due to being more transparent.