Aircraft can be painted any colour. In terms of civil aviation white was often preferable, and not just because of the weight difference as mentioned by others. When an aircraft crashes it is easier to spot white wreckage against the background terrain or, indeed, ocean.