IDL Color Handling Tools

Last Revision 7/16/1999: Added COLORINFO, updated COLORSET


COLORSET ()
Selects a sensible IDL color mode (24-bit or 8-bit) when used at IDL startup. TrueColor mode (24-bit) is selected by default. However you can attempt to select PseudoColor mode (8-bit) by setting the PSEUDOCOLOR keyword. Other default DEVICE keywords are DECOMPOSED=0 and RETAIN=2. I recommend that COLORSET be used in your IDL startup file.

COLORINFO ()
Returns information about the color mode in the current IDL session. It is designed to work with IDL versions 5.0, 5.1, and 5.2, which means the user does not have to remember which DEVICE keywords are supported in each IDL version. This routine is especially useful when run after COLORSET, because it allows the user to verify that the correct color mode is in effect. The only qualifier is that the DECOMPOSED flag can only be determined in IDL 5.2 or higher. Thus, the user should always set the DECOMPOSED flag explicitly to the desired value.

COLORS will load a selection of graphics colors (Black, White, Green, Red, etc.) into the color table.

Please feel free to download the source code, give it a whirl, and let me know what you think.


Liam E. Gumley
Last updated 16 July 1999