added color support to rectangles