coloring according to direction