Fanning Consulting Services (25K)

CIndex Program

The CIndex program (Color Index) allows you to view the color index number associated with a particular color in the color table.

The CIndex program.

Colors can be loaded by clicking the Change Colors button in the menubar, although the program XColors from the Coyote Library is required. It is a good idea to also download the TVImage program, as well.

Note that after loading new colors from the IDL command line on a 24-bit display that you will have to click the cursor somewhere inside the CIndex graphics window to see the updated colors. Here I load a yellow and green color at color indices 20 and 21, respectively.

   IDL> TVLCT, 255, 255, 0, 20
   IDL> TVLCT, 0, 255, 0, 21

Note that when you change a color a Label color changes too. (Index numbers 234 and 235, in this case.) This is because I have to use all the colors, but I want the number to show up on top of a color. Thus, I write the numbers in the "opposite" or "complementary" color.

The CIndex program.

Download the CIndex program here.

-------

[Return to IDL Programs]

Copyright © 2000 David W. Fanning
Last Updated 15 February 2000