next up previous contents index
Next: Graphical Input Up: The Graphics System Previous: Fonts for Text Output


Colour Map Usage

FIT2D is presently optimised for use on colour displays (``X-displays'') with a maximum of 256 available displayable colours at any one time (``8-bit plane pseudo-color''). These are still the vast majority of available displays, although ``24-bit plane'' ``true colour'' displays are starting to become more common.

An individual window e.g. the FIT2D graphics window, is allowed to define up to 256 individual colours, which may be different to those which are defined by another window. When the user clicks in a new window61, then the colours defined by the new window replace the colours previously used. This is termed ``colour flash'', and previously readable text may become unreadable.

``Colour flash'' may be avoided if all windows share the same colours, but this not suitable for efficient false colour image display e.g. grey scale, of large images. FIT2D defines its own colours. If there are enough remaining undefined colours in the default colour table, then this will be used and ``colour flash'' will not occur. Unfortunately, window managers and other programs are using more and more colours simply for button display and shading, so often very few colours levels are undefined. In this case, a new individual colour table is created and used by FIT2D. To minimise the problem cased by ``colour flash'' the first 40 colours in the existing colour table are copied and are left unchanged. On some X-displays this keeps text readable, but unfortunately other X-displays use other colour levels for displaying text so still suffer from ``colour flash''.

FIT2D needs a large number of colour levels to be able display false colour (or grey-scale) images efficiently with a smooth colour scale. To minimise the problem of colour ``flash'' FIT2D will use the default colour map if a minimum number of contiguous colour levels are free (presently 108). It will then use the remaining colours to produce the smooth false colour scale and 8 basic colours. Otherwise a new colour map, unique to FIT2D will be created. The first 40 levels will be copied from the window managers colour map, and the remaining levels will be used for the smooth false colour scale and 8 basic colours. If this happens colour ``flash'' will probably be noticed, but depending on which levels are used for which windows the effect may be minimised62. It is worth noting that some programs, have not been written to create their own colour tables, so will not work after FIT2D has been started. However, if such programs are started first, and FIT2D afterwards, the two can be used simultaneously.

Within the colours defined by FIT2D eight colours are always fixed, and are used for menu display and user prompts (white, black, red, green, blue, yellow, cyan, and magenta). The remaining colour levels are filled with the required false colour table e.g. geographical or inverse grey-scale. Different colour tables contain different colours so graphical objects which are not coloured in one of the eight constant colours will change colour when the colour table is changed. (This is why the ``FIT2D'' logo background sometimes changes colour just after FIT2D is started. The background is orange, which is defined in the default colour table, but not for example in a grey-scale.)

The number of colour indices used may be varied by a command-line argument -col (see Section 20, Page [*]).

Note: some programs e.g. the DENZO display program Xdisplayf, do not work properly if they cannot obtain enough colour levels from the window managers colour map. With such a program it may be better to start the program first and FIT2D afterwards, if both are required simultaneously.


next up previous contents index
Next: Graphical Input Up: The Graphics System Previous: Fonts for Text Output
Andrew Hammersley
2004-01-09