improved location-index (color) assignment