On OpenGL you don’t fill the polygon by hand, you can specify the color for the next vertex with one of the glColor functions.
Another way to give color to your polygon is by using a Texture.
There is also another way of controlling the color of each, by using a fragment program.