I gave two stars because by running this program, the root is changed then not changed back. That is not a good way to make users of your code happy. When the user closes the GUI, you need to set colordef back to what it was prior to initialization. I will change my rating when this is fixed.
In the lines where you calculate the quadratic formula, you need a parenthesis around the 2*a, like this;
Otherwise your solutions are only valid for a = 1.