VIMOS Ultra-Deep Survey (VUDS): IGM transmission towards galaxies with 2.5 < z < 5.5 and the colour selection of high-redshift galaxies