Envision's default colormap was chosen to contain a wide range of useful colors, in a pattern that is easy to manipulate computationally, and also preserve the readability of typical X windows. Readability of other windows is an issue when using 8-bit displays, because Envision changes the entire colormap when you select one of its windows.
Let us first define the penultimate colormap. In the penultimate colormap, the most significant two bits represent the blue component, the next three bits represent the red component, and the three least significant three bits represent the green component. So, if k is a colormap cell, then
These values are then multiplied by suitable constants, so that the values for each component span the range from 0 to 1.
The penultimate colormap is easy to manipulate mathematically. However, on an 8-bit display, it tends to leave other windows dark and sometimes unreadable. This is because, in a typical X installation, the first colormap entry is black, followed by white, and then by a selection of relatively light colors which make nice window backgrounds.
Therefore, to create the final colormap, we permute the entries using the function shuffle defined by
This reverses entries in the range [1,255] but leaves zero fixed. Notice that the function shuffle is its own inverse.
Ownership, Maintenance and Disclaimers
Manual Top Page
Last modified Monday, 22-Sep-1997 22:50:08 PDT