The color matrix extension (SGI_color_matrix) defines a 4x4 color matrix which is managed using the same commands as the projection, modelview, or texture matrix. The color matrix premultiplies RGBA colors in the pixel transfer pipeline and as such can be used to perform linear color space conversions.
Since the color matrix is treated like any other matrix, it is always enabled and defaults to the identity. To change the contents of the color matrix, the current matrix mode must be set to GL_COLOR using the glMatrixMode() command. After that, the color matrix may be manipulated using the same commands as any other matrix. The commands glLoadMatrix(), glPushMatrix(), and glPopMatrix() generally prove the most useful.
The color matrix extension is currently supported on the following platforms: