Implemented coloring of the rectangles by specifications given to the option ColorRules.