How can I curve the colored squares at top?

There are multiple methods. A recommended method is to select the shape and click the yellow box; then click and drag the yellow diamond shapes that appear to create a curve. There are also the Corner Options located in the control bar (see drop down at right side) or under the Object menu.