The colour of robes of Luke Skywalker is white. A sign of goodness and purity. His lightsaber is also of a cooler colour like blue and green. The combination of white with blu , makes his image of a good and trustable character. He is loyal and confident. While the Darth Vader is portrayed in Black which means evil or death. The lightsaber of the Darth Vader is red in colour which makes him fearsome and destructive. The use of Black and red makes a negative character as opposed to White and blue, that makes a positive Character.
Transition in values through colour
Transitional colours are those colours associated with a character or an idea that change, either drastically or gradually depending on the character arcs or turn of events in a story. Such use of colour helps to add an extra layer or meaning to the story through visuals.
We sometimes instantly understand which character is good or bad. This is because colours can also tell us a character's allegiance or values. In films, there is a common war of red and blue, warm and cool. Red and blue lightsabers are iconic. You know whoever uses the red saber is always a member of the dark side, while whoever uses the blue or a cool coloured light saber-green/purple is on the light side. This colour coding is also often used in action sequences for identifying the protagonist and antagonist.
The shift or transition in these set colours can tell the audience that the values/allegiances of the characters are changed.