code now adjusts color according to the number of clusters