Color

OpenGL has a concept of a current color, a current normal, and current texture coordinates. When you make a glVertex call, those values are associated with the vertex you just specified.
	glBegin(GL_TRIANGLES);
	glColor3f(1,0,0);
	glVertex(...);
	glVertex(...);
	glColor3f(0,1,0);
	glVertex(...);
	glEnd()
In the preceeding code chunk, the first 2 vertices of the triangle would have the color (1,0,0) associated with them, while the last vertex would have the color (0,1,0).

The current color is specified with glColor(). It has all the forms of glVertex() and it has the additional forms of unsigned short, unsigned int and signed and unsigned byte (it does not however have the 2 component form). For example, if I wanted to specify the r,g,b, and alpha components of the current color with single unsigned bytes stored in an array, I would use

	GLubyte array[4];
	glColor4ubv(array);