clean up of the getColors method