Given a graph
. The black-and-white coloring problem asks if there exist disjoint sets of vertices
such that no vertex in
is adjacent to any vertex in
. In this paper we show that the problem is polynomial when restricted to cographs, distance-hereditary graphs, interval graphs and strongly chordal graphs. We show that the problem is NP-complete on splitgraphs.