Polynomials associated with graph coloring and orientations