Define Color Tables
This topic describes the options available in the Custom Color Table dialog. You can choose a predefined color table, define a color gradient, or work with different color spaces.
Predefined Color Table
Click the Predefined tab. Select a standard IDL color table from the options provided. The default color table is Rainbow. See the Loading a Default Color Table topic in IDL Help for more information about the available color tables.
Color Gradient
Click the Color Gradient tab. It initially displays a default color gradient from white to black, with maximum smoothing applied:
The default color space is RGB (red/green/blue). To change this, click the Color Space drop-down list and select one of the following options:
- HSV: Hue/saturation/value
- HLS: Hue/lightness/saturation
To stretch the gradient in either direction, click and drag the diamond icon above the color gradient to the left or right.
Follow these steps to define the colors used in the gradient. At least two colors are required.
- Click the left marker, then click the Color button and choose a color; for example:
- Repeat for the right side of the gradient.
- Add more markers in between by clicking in the space below the color gradient. Then click the Color button and choose their colors; for example:
- You can delete a marker by selecting it and clicking the Delete button.
For example, you can create a rainbow gradient by choosing red for the left color, choosing purple for the right color, then selecting the HSV color space:
You can modify the gradient by adding more colors and clicking/dragging the diamond icons above the gradient to stretch the colors. This can be useful when you want certain colors to predominate such as yellows and greens, as the following example shows:
To change the number of distinct colors in the gradient, click and drag the Smooth slider as needed. If you drag it farther to the left, the gradient is broken down into fewer colors; for example:
To save a gradient to disk, click the Save button and select a location and filename for the gradient definition file (.json
).
To restore a previously saved gradient definition, click the Open button and select a gradient file (.json
).
Color Space
Click the Color Space tab. The DEM color table can be represented in one of the following color spaces:
- RGB (red, green, blue)
- HLS (hue, lightness, saturation)
- HSV (hue, saturation, value/intensity)
You can modify each element of a selected color table individually. Choose an option from the drop-down list, then move the slider bar to adjust the value of that element. The following figure shows an example of modifying the Red element of an RGB color model:
You can further customize the color gradient by clicking inside of the color space window to add points; for example:
You can add up to 15 points. Click and drag points to new locations if desired. Double-click points to delete them.To reset the color space back to two points only, click the Reset button. Reset only resets the color space, not the value of the selected element.
To save a color space definition to disk, click the Save button and select a location and filename for the color space definition file (.json
). To restore a previously saved color space definition, click the Open button and select a color space definition file (.json
).