Color Manager |

### Overview

This tool is used to modify the color palette mapping used in the image. If you are opening an Image View of a band or tie-point grid, the image loads with the color settings of the band stored within the data file itself (BEAM-DIMAP format only) or for other files it applies default color settings as defined in the Preferences (/Tools/Options/Color Manager).

Depending on the type of the source data used for the images and the type of images to be created, this tool offers three editor modes: Basic, Sliders and Table. If the source data is a single spectral/geophysical band, then the Basic, Sliders and Table mode editors are all used. If the source data is an indexed band then only the Table editor is used. If the source data is 3 bands used to create a RGB image then only the Sliders editor is used.

To open the Color Manager tool window, use the corresponding icon in the "Tool Windows" toolbar or select /Tool Windows/Color Manager from the main menu. Changes made within the Color Manager tool window will directly become effective in the image of the currently selected band.

#### Some Common Functions

Each editor mode (Basic, Sliders, Table) in this tool has unique parameters but all editors share the following common functions:

- The "Reset" button resets to the default settings. In the case of a single spectral/geophysical band it applies the default color scheme if applicable.
- The "Log Scaling" button toggles the log scaling and applies it to the image. This option is not available in the RGB image and for the index band source. For the RGB image, any concept of log scaling needs to be either contained within the configuration profile, or you can use the "Gamma non-linearity" feature within "More Options".
- The "Apply to Other Bands" button enables you to apply/load the color palette into any other band which is opened in a view window.
- The "Import Palette" button enables you to import a palette file (cpd or cpt). Essentially this functions identically to the color palette chooser except that this is a dialog selector displaying the files.
- The "Export Palette" button enables you to export a "custom" palette file (cpd, cpt, or pal) from the current parameters.

#### Basic Editor

The "Basic" editor is only used when the source data is a single spectral/geophysical band. In this editor you can select the color palette, the range (minimum and maximum), and whether the scaling is logarithmic. These 3 parameters (palette, range and scaling) define a color scheme. You may either select a pre-defined color scheme or individually adjust any of the parameters. Note that a color scheme can automatically be applied when an image window is opened based on the band name (see Preferences).

A.1: Basic mode editor (for images of a single, spectral/geophysical band)

Scheme: This section handles the setting and display of the color scheme.

- Scheme Selector: This selector is used to specify a pre-defined color scheme. Once you choose a color scheme, all components and the image will be updated with the parameters (palette, range and scaling) of the color scheme. These color schemes are configured in xml files. A user editable file for custom schemes is at (~/.snap/auxdata/color_schemes/color_palette_schemes_user.xml or ~/.seadas/auxdata/color_schemes/color_palette_schemes_user.xml). If a scheme was automatically applied via bandname-lookup when you opened the view window of the band, then this selector should display the scheme which has been applied. Any subsequent changes to scheme parameters will cause this selector to be set to "None" (indicating that the scheme no longer is being used in the image).

Palette: This section enables you to load in a color palette.

- Color Palette Chooser: used to select pre-defined color palettes. These palettes are stored in (~/.snap/auxdata/color_palettes). There are currently two supported formats of these palettes: cpd and cpt. CPD is the native format (BEAM, SNAP and SeaDAS). CPT is the format used in the Generic Mapping Tools software. Each of these formats contain not only the color ramp, but actual data values for each point in the ramp. When you select the palette, those data values will automatically be redistributed across the range (Min, Max) currently displayed in the Basic window. The palettes weighting between points is preserved during this redistribution.
- Load exact values: This checkbox when checked affects the behavior of the Color Palette Chooser. If checked, then when a palette is selected the points are not redistributed to the range but instead the exact data of the palette is used.
- Reverse: This button enables you to reverse the direction of the color palette.

Range: This section enables you to adjust the min and max of the color palettes. Any change to these fields will cause the color palette to redistribute based on this range, while retaining any current distribution point weighting factors contained within the currently loaded palette. To alter the distribution see the "Sliders" and the "Table" editors.

- Min: This textfield sets the image data value to use for the first point of the color palette. The first palette point color will be applied to all pixels with values below this minimum value.
- Min: This textfield sets the image data value to use for the last point of the color palette. The last palette point color will be applied to all pixels with values above this maximum value.
- From Palette: This button loads in the range settings from the palette file which was originally loaded within the palette chooser while maintaining any subsequent user alterations of the point distribution.
- From Data: This button loads in the range obtained from the statistics of the data (min and max percentile of the data - see Preferences). If you wish to load other statistical ranges based on a histogram of the data see the "Sliders" editor.

#### Sliders Editor

In the "Slider" mode you have control over how the individual points of the color palette are distributed. You also have features associated with using the statistics and histogram of the data. The histogram is displayed over the applied color palette with adjustable sliders for each point of the palette.

A.2: Sliders mode editor for images of a single, spectral/geophysical band

Modifying the Sliders: Various aspects including color and position may be modified here, as well as adding and removing sliders.

- Color/Transparency: To change the color/transparency of a slider, left-click on the slider and a variety of color selection options are available. One option is "None" which makes the color bar at the slider location fully transparent. The transparency is a linear progression between the adjacent sliders. More colors and partial transparency is available within the "More" option.
- Value: To change the data value of a slider you may either click on the slider and move it, or left-click on the slider's label text and directly enter a new value in the textfield popup.
- Add Slider To add a new slider, right click anywhere on the color bar between two existing slider and select "Add new Slider". A new slider will be inserted beneath the location of the mouse-click with its value and its colors set automatically by a linear interpolation of the adjacent sliders.
- Remove Slider To remove a slider, right click on the slider and select "Remove Slider". The palette will then be updated by interpolating between the adjacent remaining sliders
- Center Slider Position To center a slider spatially between two adjacent slider, right click on the slider and select "Center Slider Position"
- Center Slider Color To center a slider in color-space between two adjacent slider, right click on the slider and select "Center Slider Color"

Statistical Information: If the information Rough statistics! is shown, the statistical information is computed on a sub-sampled level. You can click it in order to compute the accurate statistical data

Range Auto-Adjust: Several buttons are available to auto-adjusted the range of the color palette. More range auto-adjust buttons can be added as well by setting your Preferences.

- adjusts the palette range to cover 1σ (68.27%) of all pixels in the band.
- adjusts the palette range to cover 2σ (95.45%) of all pixels in the band.
- adjusts the palette range to cover 3σ (99.73%) of all pixels in the band.
- adjusts the palette range to cover 95% of all pixels in the band.
- adjusts the palette range to cover 100% (the full range) of all pixels in the band.
- adjusts the palette range to a specific pre-set value (RGB mode only - see preferences).

Histogram View Zoom: There are several zoom options for viewing the histogram over color palette image.

- Progressively zooms in to the histogram vertically
- Progressively zooms out of the histogram vertically.
- Toggles the horizontal zoom between the palette range bounds and the full data range.

Slider Distribution: The sliders can be distributed all at once.

- Distributes the inner sliders evenly between the first and the last slider.

RGB Images The "Sliders" editor is also used for RGB images, in which case these is a red, green, and blue sliders channels

C. Editor for images using separate R,G,B channels

In this mode the sliders are used for contrast stretching in each of the R,G,B channels. In the More Options panels, you can adjust the No-Data Color and Histogram Matching for the final image. The Source Band and Gamma options apply to each channel. The gamma value is used to adapt the transfer function which quantises the band's sample values to color values. A gamma value of `0.7` for the blue channel enhances most RGB images.

#### Table Editor

In the "Table" mode you can select the color and specify the data value of each point

A.3: Editor for images of a single, spectral/geophysical band in Table mode

The "Table" editor is also used for index bands.

B.: Editor for images of a single, index-coded band

Images of a single, index-coded band, e.g. the output of a look-up discrete colors from a fixed-size table

Labels and colors are simply changed by clicking into the corresponding table cell. In the More Options panels you can adjust the No-Data Color.

### More Options

#### No-Data Color

In the More Options panel of all editors you can adjust the No-Data Color. This color will be used for no-data pixels in the source band(s). If you select None, no-data sample will be transparent in the image.

#### Histogram Matching

It is sometimes desirable to transform an image so that its histogram matches that of a specified functional form. It is possible to apply an equalized or normalized histogram matching to images which can often improve image quality.

#### Discrete Colors

Sometimes it is needed that an image is classified by value ranges. Each value range should be displayed with a defined color. To toggle the use of discrete colors use the discrete color checkbox. Each slider position defines the start or the end of a value range. The color of an image pixel is defined by the following rule:

                lsc = leftSliderColor
                lsv = leftSliderValue
                rsv = rightSliderValue
                vop = valueOfImagePixel
                if (vop >= lsv && vop < rsv) then pixelColor = lsc

Discrete colors 'off'

Discrete colors 'on'

#### Other Related Export Options

The color palette information used for the current image can also be exported into an image file. Click the context menu item Export Color Legend over an open image view in order export the color legend.

The color palette can be also exported as a Color Palette Table. Choose from the File menu Color Palette to export the table as a *.csv or *.txt file.

#### Extra information

The information icon is used to toggle the visibility of the extra information area.

#### Context help

The help icon opens the Help for the current context.