change color of the line if it is selected, i.e. it satisfies the selected line point apporximation criteria