SVR5 SCO OpenServer 5, AIX 5L


color3 -- verify that the correct number of colors are displayed for a graphics adapter driver


./color3 [-h[elp]] [-V -v -n <N> -q <S> -geo[metry] WxH+-X+-Y ]


color3 is run with text2(1Mcert) to verify that the resolution and modes configured on vt01 (tty01) and vt02 (tty02) display correctly.


The options are:

Verbose Mode; outputs color map information from the X server. See xdpyinfo(X1M) for more information.

Show version

-n <num>
Stop painting shade after <num> colors. This is used to check bit pattern problems.

-q <sec>
After displaying and painting the window, exit and quit after sleeping <sec> seconds. Note that using an alarm (which is not recommended in X programming) may cause a client to core dump depending upon what is happening with the data stream to the server.

-geo[metry] <width>x<height>{+-}<xoffset>{+-}<yoffset>

Get help for the command. To save the output to a file:
   ./color3 -h >


color3 draws a shaded background and a color wheel pattern utilizing all the colormap entries, then excercises the color palette. Keystrokes are used to examine the color possibilities when the window has focus:

q or Q
Quit and exit.

r or R
Display a palette of only red colors.

b or B
Display a palette of only blue colors.

Display a palette of only green colors.

Display a palette of only shades of gray.

c or C
Display a palette of colors based on hue, saturation, lightness model.

n or N
Display the initial colormap in effect at the startup of this client.

t or T
On TrueColor displays, displays all the colors. Only a few pixels are displayed per color; this is a crowded display to say the least. This does not work correctly on a 24 bit display with 16M colors, but it does attempt to draw all the colors.

mouse button 1
Allows adjustment of saturation and lightness of the colored palette: lightness changing when the mouse is moved on the y axis, and saturation changing when the mouse is moved on the x axis. While this adjustment is being made, primitive slide scales are displayed on the bottom and right sides of the window. The scales range from 0 to 100 %; the initial value for lightness is 50 % and saturation is 100 %. If the screen goes black, just type n or N to recover. Note that, on TrueColor displays, the pattern must be redrawn in order to change.

mouse button 2
When available on the server, quit and exit.

mouse button 3
Similar to button 1, but this time will adjust the colors that were available for read/write from the default colormap instead of its own private colormap. If the colormap was completely busy, this operation is a noop. Another difference from button 1 is that this operation changes the saturation and hue, rather than the saturation and lightness. The lightness value used is whatever is left over from use of button 1. Note that, on TrueColor displays, the pattern must be redrawn in order to change.


While running color3, verify that the correct number of colors are displayed (for example, 256, 64K). Resize and move the color3 window around the screen and check for screen corruption.

If color3 appears solid white or black, try resizing the window. The colorwheel will appear after doing this. If you expose a covered portion of the color3 window and it does not redraw, resize the window again. This is a known problem with the color3 test and does not indicate a problem with your graphics adapter driver.


The color3 test is included in the xtests package that can be downloaded from the HDK homepage or installed from the HDK CD-ROM. The AIX 5L version is also available from the AIX 5L homepage

Version applicability

NFB graphical drivers for SVR5, SCO OpenServer 5, and AIX 5L.

Differences between versions

The SCO OpenServer 5 syntax for this test is



color3 has been tested for 2 color StaticGrey, 16 and 256 Color PseudoColor, 32K TrueColor and 24 bit TrueColor displays.

On the SGI 24 bit server, the red and blue fields are reversed.

Almost no error checking is performed on the Xlib calls. Often the client will not recognize its first expose event and result in an initial blank window. Simply change the window size to cause an expose event and it will draw its pattern.

color3 consumes significant server time during its drawing. Event checking should be placed within its drawing loop to give the server time to do something else.


Full path for SVR5 and SCO OpenServer 5 systems.


graftest(1Mcert), text2(1Mcert), uts(1Mcert)

``Testing and debugging SVR5 NFB drivers'' in Developing NFB graphics adapter drivers
``NFB driver coding guidelines'' in Developing NFB graphics adapter drivers

19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005