Conjectures about Complex roots of polynomials

In the right hand panel the function is plotted over the complex plane The left hand panel shows the plane. The coordinates of the large dot determine the values of P and Q. Varying the values of and allow you to explore the real and complex roots of the quadratic. Why does the dot change color? Where is it red? green? Can you make a conjecture about a similar construction for cubics? Can you prove it?