Loading a Default Color Table

Although you can define your own color tables, IDL provides 41 pre-defined color lookup tables (LUTs). Each color table contained within this routine is specified through an index value ranging from 0 to 40, shown in the following table.

Tip
If you are running IDL on a TrueColor display, set DEVICE, DECOMPOSED = 0 before your first color table related routine is used within an IDL session or program. See Foreground Color for more information.

Table 5-5: Pre-defined Color Tables 

Number
Name
Number
Name
0

Black & White Linear

21

Hue Sat Value 1

1

Blue/White Linear

22

Hue Sat Value 2

2

Green-Red-Blue-White

23

Purple-Red + Stripes

3

Red Temperature

24

Beach

4

Blue-Green-Red-Yellow

25

Mac Style

5

Standard Gamma-II

26

Eos A

6

Prism

27

Eos B

7

Red-Purple

28

Hardcandy

8

Green/White Linear

29

Nature

9

Green/White Exponential

30

Ocean

10

Green-Pink

31

Peppermint

11

Blue-Red

32

Plasma

12

16 Level

33

Blue-Red 2

13

Rainbow

34

Rainbow 2

14

Steps

35

Blue Waves

15

Stern Special

36

Volcano

16

Haze

37

Waves

17

Blue-Pastel-Red

38

Rainbow18

18

Pastels

39

Rainbow + white

19

Hue Sat Lightness 1

40

Rainbow + black

20

Hue Sat Lightness 2

You can load a default color table in an iImage display, an Object Graphics Display or a Direct Graphics display as follows:

Modifying and Converting Color Tables

IDL contains two graphical user interface (GUI) utilities for modifying a color table, XLOADCT and XPALETTE (. The MODIFYCT routine lets you create or modify and store a new color table. See the following topics for examples:

These examples are based on the default RGB (red, green, and blue) color system. IDL also contains routines that allow you to use other color systems including hue, saturation, and value (HSV) and hue, lightness, and saturation (HLS). These routines and color systems are explained in Converting to Other Color Systems.

Highlighting Features with a Color Table

For indexed images, custom color tables can be derived to highlight specific features. Color tables are usually designed to vary within certain ranges to show dramatic changes within an image. Some color tables are designed to highlight features with drastic color change in adjacent ranges (for example setting 0 through 20 to black and setting 21 through 40 to white).

Note
Color tables are associated with indexed images. RGB images already contain their own color information. If you want to derive a color table for an RGB image, you should convert it to an indexed image with the COLOR_QUAN routine. You should also set COLOR_QUAN's CUBE keyword to 6 to insure the resulting indexed image is an intensity representation of the original RGB image. See COLOR_QUAN for more information

See the following topics for examples: