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 matrix. To change the contents of the color matrix, the current matrix mode must be set to GL_ COLOR using glMatrixMode(). After that, the color matrix may be manipulated using the same commands as any other matrix; for example, glLoadMatrix(), glPushMatrix(), and glPopMatrix().
The color matrix extension is currently supported on the following platforms: