function for vertices and color