The polygon object can be any shape that has at least ... but given the frequency of its use, most vector graphic file formats support a specific rectangle object. Squares could be created using ...
For a shape with more sides, such as a hexagon, it would be necessary to define polygon points for each angle in the object. There are many ways to identify a colour when creating vector graphics.