Add new rectangle And select

Rhino.AddPolyline array(apts(0), apts(1), apts(2), apts(3), apts(0))

How to select and Change color.

Thanks

pl=Rhino.AddPolyline array(apts(0), apts(1), apts(2), apts(3), apts(0))
Rhino.ObjectColor(pl,array(r,g,b))

(where r,g,b represents the color you want)

Thank you.