Use a polynomial of degree 6 function to calcuate colors