2003-2004 Silicon Graphics, Inc.
glColor 3G
glColor glColor4f glColor4x set the current color

## C Specification

void `glColor4f` GLfloat red GLfloat green GLfloat blue GLfloat alpha void `glColor4x` GLfixed red GLfixed green GLfixed blue GLfixed alpha void `glColor4ub` GLubyte red GLubyte green GLubyte blue GLubyte alpha

## Parameters

red, green, blue, alpha

  Specify new red, green, blue, and alpha values for the current color.

## Description

`glColor` sets a new four-valued current RGBA color.

Current color values are stored in fixed-point or floating-point. In case the values are stored in floating-point, the mantissa and exponent sizes are unspecified.

Neither fixed-point nor floating-point values are clamped to the range [0, 1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into the color buffer.

Unsigned byte color components specified with `glColor4ub` are linearly mapped to floating-point values such that 255 maps to 1.0 (full intensity), and 0 maps to 0.0 (zero intensity).

## Notes

The initial value for the current color is (1, 1, 1, 1).

## Associated Gets

glGet with argument `GL_CURRENT_COLOR`

## See Also

glColorPointer, glNormal, glMultiTexCoord

## Copyright

Copyright 2003-2004 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.