Color adjacent nodes, directed and undirected