Dividing into line segments to color individually