We show that the compactness of $G$-free $k$-colorability is equivalent to the Boolean prime ideal theorem for any graph G with more than two vertices and any $k\ge 2$.