The sunlight is made up of many different colored light waves (put together they form white light). When these light waves cross the sea water they are absorbed by the water itself: some faster, others less. And so the colors are lost, a little at a time: first the red and yellow disappear, which have less energy, followed by green and purple. Blue light, on the other hand, lasts longer than other light waves because it has a greater penetration capacity: that’s why the sea has this color. The color of the sky (which is reflected in the water) partially influences the color of the sea, which in fact has different shades if the sky is cloudy rather than blue.
The more you know