Palettes
Previous  Top  Next

Although Windows programs can specify colors made up of any admixture of red, green and blue components, it is generally a good idea to use simple colors whenever possible, to increase the chances of faithful reproduction on a variety of display and output devices.

16-Color Palette. SHAPE uses a primary palette composed of 16 colors for two reasons: to aid in the consistent selection of simple colors; and to form a basis for the 256-color palette used for 8-bit displays or other devices. The first eight colors in the default 16-color palette are black, white, red, green and blue, and then the binary combinations of red, green and blue which are cyan, magenta (violet) and yellow. The second eight colors are two shades of gray, then the binary combinations of red, green, blue, cyan, magenta and yellow (these six have no universally-recognized names). The colors in this palette are the same as those in the Alternate palette which is used in the DOS versions of SHAPE, but in a different order.

The RGB values in the 16-color palette can be changed with the Palette dialog in the Settings menu. You can also save and re-read palette (.pal) files.

256-Color Palettes. The palettes which are used in 256-color screen-display modes are primarily designed for shading. There are two distinct palettes; the first has 15 principal colors, each with 16 gradations from full intensity to almost black, and is used when the number of shading zones (Shading dialog in the Input1 menu) is 16 or fewer; the second has only 7 principal colors, each with 32 gradations from full intensity to almost black, and is used when the number of shading zones is 32.

The first or "16-zone" palette is made up as follows. The first 15 colors (0-14) start with full-intensity color number 1 (white), and grade with decreasing intensity to near black; the second 15 colors (15-29) start with full intensity color number 2, grading to near black, and so on. When shading is in effect, SHAPE finds the nearest color in the 16-color palette to the crystal color selected in the Shading dialog (Input1 menu). Any face receiving full illumination is given this full-intensity color and faces at angles to the illumination vector are given colors in the series of 15 colors derived from that principal color. The palette defined in this way actually contains only 225 colors. Windows reserves 20 colors for its own use, including black which therefore does not have to be defined in the SHAPE palette.

In the second or "32-zone" palette, the first 31 colors (0-30) grade from full-intensity color 1 to near black, the next 31 from full-intensity color 2 to near black and so on, through color number 7 and its derivatives. When shading is in effect, SHAPE again "forces" the color to one of those in the 16-color palette, but the choices this time are only colors 0-7. As the colors are arranged in the default palette, this results in changing colors 8-15 to 0-7 respectively. Actually, colors 0-7 can be regarded as "simplified" or more basic versions of colors 8-15. The above shaded colors add up to only 217, so colors 8-15 are also added to the palette to be usable for lines and unshaded fills.

Again, if shading is in effect and you are using more than 16 shading zones (Shading dialog in the Input2 menu), any fill colors or shading colors in the range 8-15 will be automatically "downgraded" to colors 0-7.

All these complexities and restrictions pertain only to 8-bit or 256-color display or raster files. For standard VGA (4-bit) display, the RGB values are sent to the display driver, which determines in its own way what combination of pixels to mix to represent a given color. This is likewise true for printer and PostScript output. The RGB values are also sent directly to 24-bit screen displays, which can presumably render any color without dithering.