use all edges to find background color