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.
Results that may be inaccessible to you are currently showing.