# OpenGL Programming/reference/glColor
## Description
### Visual effect

* changes the color of the next objects to be drawn

## Usage Context

* Will work anywhere in Display loop but normally used between glBegin and glEnd.
* Affects everything following until it is called again or the loop starts over.
* glEnd; and glBegin; do not affect it.

## Usage Examples

* draws 7 points and 3 different colors
* starting from x center y .5+ and moving to x .6+ y .5+
* shows that the color will stay even if you restart a new gl section
* shows that the color will stay even if the loop starts over
* replace the display function with this in the basic testing app program to see the results

## Function definitions

* WINGDIAPI void APIENTRY glColor3b (GLbyte red, GLbyte green, GLbyte blue);
* WINGDIAPI void APIENTRY glColor3bv (const GLbyte *v);
* WINGDIAPI void APIENTRY glColor3d (GLdouble red, GLdouble green, GLdouble blue);
* WINGDIAPI void APIENTRY glColor3dv (const GLdouble *v);
* WINGDIAPI void APIENTRY glColor3f (GLfloat red, GLfloat green, GLfloat blue);
* WINGDIAPI void APIENTRY glColor3fv (const GLfloat *v);
* WINGDIAPI void APIENTRY glColor3i (GLint red, GLint green, GLint blue);
* WINGDIAPI void APIENTRY glColor3iv (const GLint *v);
* WINGDIAPI void APIENTRY glColor3s (GLshort red, GLshort green, GLshort blue);
* WINGDIAPI void APIENTRY glColor3sv (const GLshort *v);
* WINGDIAPI void APIENTRY glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
* WINGDIAPI void APIENTRY glColor3ubv (const GLubyte *v);
* WINGDIAPI void APIENTRY glColor3ui (GLuint red, GLuint green, GLuint blue);
* WINGDIAPI void APIENTRY glColor3uiv (const GLuint *v);
* WINGDIAPI void APIENTRY glColor3us (GLushort red, GLushort green, GLushort blue);
* WINGDIAPI void APIENTRY glColor3usv (const GLushort *v);
* WINGDIAPI void APIENTRY glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
* WINGDIAPI void APIENTRY glColor4bv (const GLbyte *v);
* WINGDIAPI void APIENTRY glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
* WINGDIAPI void APIENTRY glColor4dv (const GLdouble *v);
* WINGDIAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
* WINGDIAPI void APIENTRY glColor4fv (const GLfloat *v);
* WINGDIAPI void APIENTRY glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
* WINGDIAPI void APIENTRY glColor4iv (const GLint *v);
* WINGDIAPI void APIENTRY glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
* WINGDIAPI void APIENTRY glColor4sv (const GLshort *v);
* WINGDIAPI void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
* WINGDIAPI void APIENTRY glColor4ubv (const GLubyte *v);
* WINGDIAPI void APIENTRY glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
* WINGDIAPI void APIENTRY glColor4uiv (const GLuint *v);
* WINGDIAPI void APIENTRY glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
* WINGDIAPI void APIENTRY glColor4usv (const GLushort *v);

## Related functions

* WINGDIAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
* WINGDIAPI void APIENTRY glColorMaterial (GLenum face, GLenum mode);
* WINGDIAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);

## References

http://www.cs.utk.edu/~vose/c-stuff/opengl/glColor.html