About Color Tables

Version: Map6.01 Date: 4/5/05

Map Color Tables

Map6 color tables have 256-level palettes. Where color tables are used in Map6, they provide support for IDL's indexed color mode. The color tables also store a small amount of additional information: the min and max value that are represented by the color ramp. It is assumed that the palette elements correspond in linear fashion to the values represented.

Saving and restoring color tables

The user can save any number of color tables in their own Map6 folder. These are stored in the /Suppdata/Palettes folder. Saving and restoring color tables is always done via the Edit->Color Tables menu entry. Applying a color table is always done via the Property Sheet inspector for an individual object.

Editing and generating color tables

When the user chooses the meu item Edit->Palette, a GUI is provided for color table manipulation.

At this point, the user can load a palette (.pal, stored in Suppdata/Palettes) or a legacy color table (.col). This is accomplished with one of the two buttons in the lower left, bringing up the usual file dialog. If no file is loaded, a default all-white color table is present in the GUI. Here, I load a reflectivity color table...

This adds the scaled color bar, and puts the color table min and maximum values in the two text windows.

The colors in the color table are manipulated with the set of five sliders. The top slider chooses the Index of the color that is to be manipulated. In this case, we are near the center of the palette, near the color to be used for ~32 dBZ.

The second slider (Influence) sets the width of the color region to be manipulated. In this case, about 10 palette entries either side of the Index point will be manipulated. The changes are tapered linearly from the Index outward in both directions to the Influence distance. For example, suppose we now move the Red slider to zero. The red content at the Index value is changed to zero. As we progress away from the index location, we retain progressively more of the original red. Colors beyond the Influence value are unaltered.

As the Index slider is moved to other indices, the Red, Green, and Blue sliders automatically move to values corresponding to the color set for that particular index.

A second, more useful color table manipulation can be performed by moving the Influence slider all the way to the left... zero. In this case, the color table will be linearly interpolated between each new setting of the Index slider, and subsequent adjustments of the Red, Green, and Blue sliders. For example, suppose you want a color table that goes from dark blue at an index of zero, to white at the center index, to intense red at the maximum index.

First, you would set the Influence slider to zero. Then you would move the Index slider to zero to manipulate the color at that index. You would move the Blue slider to its full value, and the Red and Green sliders to zero. This sets the color at the index of zero to intense blue.

Next, you would move the Index slider to its center position, and the Red, Green, and Blue sliders to their full intensity. This would make the color at the middle index white, and you would see this change immediately in the color bar.

Finally, you would move the Index slider to its right-most position, full value. You would set the Red slider to full value, and the Green and Blue sliders to zero. This would complete the generation of the desired color table, and you could use the Save or Save As... buttons as appropriate.

Note that a new linear segment (or segments) is created in the color table each time you move the Index slider to a new location and follow that action with the adjustment of at least one of the color sliders.

Of course, each palette represents only the colors associated with 256 indices. To apply a palette, Map6 must know how to associate these colors with actual data values. This is done via the Min and Max windows. When these are edited, the scale values in the Colorbar change with each edit. In the example above, the colors are for values ranging from -5 to +70 dBZ.

It is very easy to muck up a color table until it is unusable. If this happens, press the Revert button, and the color table will be restored to its original values.

Once you have a color table that you like, press the Save or Save As... buttons. These work in the traditional way, with Save replacing the palette (.pal) file that is being manipulated, and Save As... allowing you to give the palette a new name.

Legacy color tables (.col files)

Map6 no longer uses .col color table files as a native format. However, these can easily be converted to .pal files. Simply use Edit->Palette to bring up the palette editor shown above, press Load .col, and then press Save As... to save it as a .pal file. No manipulation is required. Be sure to save in your Suppdata/Palettes directory because this is where Map6 looks for palette files.

The old .col files also held linestyle and line width information. This capability has been moved to the Property Sheet inspectors for any/all objects that use lines (e.g., grid contours). Your contour line widths, line styles, and a palette associated with a particular contour plot can all be saved as a user style if you desire.