gammaramp(3G) gammaramp(3G) NAME gammaramp - defines a color map ramp for gamma correction C SPECIFICATION void gammaramp(r, g, b) short r[256], g[256], b[256] PARAMETERS r expects an array of 256 elements. Each element contains a setting for the red electron gun. g expects an array of 256 elements. Each element contains a setting for the green electron gun. b expects an array of 256 elements. Each element contains a setting for the blue electron gun. DESCRIPTION gammaramp supplies a level of indirection for all color map and RGB values. For example, before the system would turn on the red gun to setting 238, the system looks in a table at location 238 and uses the value it finds there instead of 238. Thus, you can use this table to provide gamma correction, to equalize monitors with different color characteristics, or to modify the color warmth of the monitor. The default setting has r[i] = g[i] = b[i] = i. (So at location 238 of the red, green, and blue tables, you find the value 238.) When the system is in RGB mode and draws an object, the system writes the actual red, green, and blue values to the bitplanes not the indirect values. However, the values that you see when the system draws the bitmap to the screen are the indirect values: r[red], g[green], b[blue] (where r,g,b are the arrays last specified by gammaramp). Similarly, when the system is in color map mode and draws an object, the system knows that the true color of the object may be color i, but to determine the displayed color, the system finds the red, green, and blue values of color i and displays color i as r[red], g[green], b[blue]. SEE ALSO color, cmode, mapcolor, RGBcolor, gamma(6D) NOTES This routine is available only in immediate mode. On the IRIS-4D G, gamma correction in RGB mode uses the top 256 entries of the colormap. gammaramp should not be used in new developement. The X server compensates for gamma in colors used by X clients. gammaramp will bypass this. Use gammaramp with caution or a sense of humor. Page 2