Implemented validity check

Function validity_check makes sure that the color_value given is within
the valid range of the polynomial fit