Implemented the direction coloring feature.