I think I read somewhere that the blue dye used in the uniforms changed over time - the more they had to clean/wash them, the more often the color faded. I also wonder if the series regulars had uniforms made out of a different material than the extras, and so the color looked different. Look at any of the main characters in blue (like, say, Crusher) compared to any of the background extras.
Regarding Data, he was originally going to be the science officer. However, at the time, no one knew what color Data would be. They did screen tests with different makeup to see what color looked best. Once they settled on the light gold makeup, they realized that they didn't like him in a blue uniform. They had to create the "operations officer" job title for him in order to put him in a gold uniform.