Previous Topic   Next Topic   Contents   Features

Psuedocolor Displays


The number of colors is limited one some displays. The color capacity of a display is usually given as the number of color planes P. The number of colors that can be simultaneously assigned on a P plane display is 2P. Many color monitors are 8 planes with 256 colors. Color assignment in these cases is handled by indexing.

A pixel is colored by specifying a color index, or slot, whose RGB values were previously defined. Some window managers use a block of contiguous color slots at the beginning or end of the range of possible slots for the colors of windows and their decorations. If the Sabrina color map interferes with these colors, there can be a color "flashing'' as the cursor moves in and out of the Sabrina graphics window. This flashing can be avoided by not redefining color slots which are in use and visible.

A color slot offset NOff can be specified, as well as the total number N of color slots to use. Sabrina will not set the values of color indices from 0 to NOff and from NOff + N to 2P. If N is not specified, N = 2P - NOff. The default value of NOff is 0.

The number of basic colors NColor defaults to 8 for displays with 8 or 6 planes, to 4 for color displays with fewer planes, and to 16 when more than 8 planes are present. On monochrome displays, NColor = 1. Sabrina uses as many shades NShade of each basic color as possible. If no value for NShade is specified, NShade = [N / NColor], where [x] is the greatest integer in x. If NShade, but not NColor, is specified, the number of basic colors is calculated similarly.

QPALET SET, when followed by COLORS, OFFSET, PLANES, SHADES, or SLOTS, sets the value of NColor, NOff, P, NShade, or N, respectively. It is possible to enter inconsistent values for these quantities, such as having NColor X NShade > 2P or N > 2P. If such errors are found, Sabrina will issue a warning and attempt to use reasonable values.